using print() with multiprocessing and pythonw

Chris Angelico rosuav at gmail.com
Tue Nov 12 18:09:47 EST 2013


On Wed, Nov 13, 2013 at 7:22 AM, Isaac Gerg <isaac.gerg at gergltd.com> wrote:
> Thanks for the reply Bill.  The problem is the text i am getting is from a python warning message, not one of my own print() function calls.

Since sys.stdout is just an object, you could replace it with
something that redirects its write() calls to the logging function.
Might be a bit hacky, but it should work.

BTW, "sys.executable.find('pythonw') >=0" should be able to be spelled
"'pythonw' in sys.executable".

ChrisA



More information about the Python-list mailing list