Capturing OutputDebugString information in python

danbrotherston danbrotherston at
Tue Oct 16 22:34:49 CEST 2007


I am trying to get the output from the win32 platform command
OutputDebugString.  I have used the following C++ code as a

And I have been able to translate most things into python, but I have
been unable to get it to work.  I use the pywin extensions to call
CreateEvent and create the required events.  But when I wait on the
event using the WaitOnSingleEvent call, it hangs indefinitely even
when I make calls to OutputDebugString in other processes, (both
python processes using win32api and actual C++ win32 programs).  I
also used mmap to map a file (using fileno -1) to the "DBWIN_BUFFER"
but that buffer appears to be empty all the time no matter the calls
to OutputDebugString.

I have limited experience with this part of windows, but if anyone had
any ideas I'd appreciate it greatly.



More information about the Python-list mailing list