Threads with independant IO streams
Jason Harper
JasonHarper at pobox.com
Thu Mar 13 12:10:37 EST 2003
Is it possible for multiple Python threads to have their own sys.stdout
(and other streams), such that plain `print' statements in each thread
send output to different places?
I have managed to create a separate sys module for each thread (using an
import hook much like rexec uses), and can have sys.stdout.write()
output go to different places, but print output still goes to the stdout
defined in the 'real' sys module.
Jason Harper
More information about the Python-list
mailing list