build a binary for Windows on Linux, Solaris or Mac OSX?

Christopher T King squirrel at WPI.EDU
Tue Jul 6 15:29:46 EDT 2004


On Tue, 6 Jul 2004, Skip Montanaro wrote:

>     Thomas> I could do it, although it seems a little work is stil required to port
>     Thomas> watch to Windows:
>     ...
>     Thomas>     self.output = open("/dev/null", "w")
>     Thomas> IOError: [Errno 2] No such file or directory: '/dev/null'
>     >> c:\python23\scripts\watch.py(235)__init__()
> 
> That's odd.  I've run this lots on Windows in my previous job, and not
> always in debug mode.  I'll fix that.  Is sys.stderr going to be broken on
> Windows?  That is, should I use something other than sys.stderr for debug
> output?

Perhaps you're using a Cygwin- or MinGW-compiled version of Python? These 
will simulate /dev/null, but MSVC- or what-have-you compiled versions will 
not (ActiveState and I think the vanilla distribution).

Whether or not sys.stderr "works" (i.e. sends output to a descriptor 
seperate from sys.stdout) is likely also dependant on the C library used, 
but it somehow gets output to the screen in the ActiveState distribution.




More information about the Python-list mailing list