On 04/27/2013 08:22 PM, cormog...@gmail.com wrote:
Was trying os.execl() and got a "python.exe has stopped working" on my Windows
7 Ultimate SP1 x64 desktop.
I'm using Python 2.7.4 and that happens when the second arg is ''. For example:
os.execl('filename.exe','')
Wtf? :(
http://postimg.org/image/vdliyuenh/
Do you really have a program called filename.exe ?
Are you by any chance running this inside some shell or debugger, like
IDLE or KOMODO? Or is it a GUI program ? More specifically, does it
still give an error like that if you have a two-line Python program:
import os
os.execl('filename.exe', '')
execl is supposed to replace the current (python) program, with the
filename.exe one. But if the current program has any OS resources in
use (like file objects), they don't get flushed/released.
The execl was intended for use on Unix, and Windows can't really do what
it's documented to do.
If you don't get any useful answers here, I'd suggest going to
multiprocess module.
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list