build a binary for Windows on Linux, Solaris or Mac OSX?
theller at python.net
Tue Jul 6 21:31:50 CEST 2004
Skip Montanaro <skip at pobox.com> writes:
> >> Failing that, can I coax someone into building such a beast for me so
> >> I can include it on http://sourceforge.net/projects/watch/?
> 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
Did you use cygwin?
On Windows, sys.stderr works, and is usually connected to a console
window. But "/dev/null" doesn't exist. You could spell it "NUL", or
provide a Python implementation of a "bit sink".
Next problem is that os.spawnvp() doesn't exist on Windows:
Traceback (most recent call last):
File "c:\python23\Scripts\watch.py", line 668, in ?
File "c:\python23\Scripts\watch.py", line 612, in main
File "c:\python23\Scripts\watch.py", line 326, in __init__
File "c:\python23\Scripts\watch.py", line 356, in setup_server
pid = os.spawnvp(os.P_NOWAIT, cmd, args)
AttributeError: 'module' object has no attribute 'spawnvp'
-> pid = os.spawnvp(os.P_NOWAIT, cmd, args)
More information about the Python-list