popen bufsize not allowed on windows
jhudgins at gmail.com
Sun Jul 25 06:14:37 CEST 2004
> When I try setting the bufsize on popen on windows I get the following error:
> output = os.popen( "ls", 'r', 1 )
> ValueError: popen() arg 3 must be -1
setting the environment variable PYTHONUNBUFFERED *before* executing
the parent python script does the trick. (Or supposedly using the -u
option on command line when starting the parent script).
Now I am trying to get this compiled into an exe using py2exe.
Any thoughts on how to make py2exe call python unbuffered?
More information about the Python-list