getting text from WinXP console

Cappy2112 cappy2112 at gmail.com
Mon Mar 21 13:47:52 EST 2005


Are you the one who is launching the Nethack program, or is it already
running, and you ar e trying to capture the text after Nethack is
launched ?

If you are launching it you can try using one of the python popen()
calls to redirect the screen output to your python program.

I havne't doen this myself, but I've seen this suggested to many people
who have asked a similar question.

Also- you can try posting a message to the Python Tutor- as well as
googling for python popen, to look for examples.


Another alternative, is to use the tee.exe unix util (ported to wn32)
which will duplicate screen I/O to a file, or some other place.

Try googling for "unix utilities win32" -or similar combinations of
these words.




More information about the Python-list mailing list