[pywin32-checkins] pywin32/win32/Lib win32traceutil.py,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-06-30 12:59:04
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29468/win32/Lib Modified Files: win32traceutil.py Log Message: Allow Ctrl+C to cleanly shut down the trace collector. Index: win32traceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32traceutil.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32traceutil.py 8 Jan 2002 05:41:13 -0000 1.2 --- win32traceutil.py 30 Jun 2008 12:59:11 -0000 1.3 *************** *** 20,24 **** # Note - the client or the collector can be started first. ! # There is a 64k buffer. If this gets full, it is reset, and new # output appended from the start. --- 20,24 ---- # Note - the client or the collector can be started first. ! # There is a 0x20000 byte buffer. If this gets full, it is reset, and new # output appended from the start. *************** *** 34,41 **** win32trace.InitRead() print "Collecting Python Trace Output..." ! # import win32api;win32api.DebugBreak() ! while 1: ! # print win32trace.blockingread() ! sys.stdout.write(win32trace.blockingread()) --- 34,43 ---- win32trace.InitRead() print "Collecting Python Trace Output..." ! try: ! while 1: ! # a short timeout means ctrl+c works next time we wake... ! sys.stdout.write(win32trace.blockingread(500)) ! except KeyboardInterrupt: ! print "Ctrl+C" |