"python.exe has stopped working" when os.execl() runs on Windows 7
cormogram at gmail.com
cormogram at gmail.com
Sun Apr 28 01:06:38 EDT 2013
I did that but unfortunately the 'bug' persists. :(
I've chosen the os module because I though it would be more portable. :/
On Sunday, April 28, 2013 12:53:25 AM UTC-3, Nobody wrote:
> On Sat, 27 Apr 2013 17:22:31 -0700, cormogram 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','')
>
>
>
> Note that, by convention, the second argument should normally also be the
>
> filename (the second argument will be available to the program as
>
> argv[0]), e.g.:
>
>
>
> os.execl('filename.exe','filename.exe')
>
>
>
> If successful, the exec* functions don't return. On Unix, the new program
>
> replaces the existing program in the current process. IIRC, the Windows
>
> version executes the program in a child process then exit()s upon
>
> completion.
>
>
>
> The exec* functions probably shouldn't be used within a program which uses
>
> any of the more complex OS features (e.g. GUI), as they will block event
>
> processing, background threads, etc.
More information about the Python-list
mailing list