home *** CD-ROM | disk | FTP | other *** search
/ One Click 11 / OneClick11.iso / Bancos de Dados / Conversao / Mysql2Excel / Setup.exe / Mysql2Excel.exe / win32traceutil.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2003-06-23  |  1013 b   |  35 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.2)
  3.  
  4. import win32trace
  5.  
  6. def RunAsCollector():
  7.     import sys
  8.     
  9.     try:
  10.         import win32api
  11.         win32api.SetConsoleTitle('Python Trace Collector')
  12.     except:
  13.         pass
  14.  
  15.     win32trace.InitRead()
  16.     print 'Collecting Python Trace Output...'
  17.     while 1:
  18.         sys.stdout.write(win32trace.blockingread())
  19.  
  20.  
  21. def SetupForPrint():
  22.     win32trace.InitWrite()
  23.     
  24.     try:
  25.         print 'Redirecting output to win32trace remote collector'
  26.     except:
  27.         pass
  28.  
  29.     win32trace.setprint()
  30.  
  31. if __name__ == '__main__':
  32.     RunAsCollector()
  33. else:
  34.     SetupForPrint()
  35.