Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44458

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

Newsgroups comp.lang.python
Date 2013-04-27 18:05 -0700
References <2e11de8b-f7e1-407f-a2fd-a08d5ce55d0b@googlegroups.com> <mailman.1131.1367110561.3114.python-list@python.org>
Message-ID <b53733c1-7d3f-47dd-bc6d-7f33fa91aa78@googlegroups.com> (permalink)
Subject Re: "python.exe has stopped working" when os.execl() runs on Windows 7
From cormogram@gmail.com

Show all headers | View raw


Yes, just those two lines cause the error. 'filename.exe' exists and runs ok in the command prompt. Any other executable cause the problem, also '', for example:

os.execl('','')

If doesn't work on Windows it should give an error message, right?

On Saturday, April 27, 2013 9:55:34 PM UTC-3, Dave Angel wrote:
> On 04/27/2013 08:22 PM, cormogram@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

"python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 17:22 -0700
  Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Dave Angel <davea@davea.name> - 2013-04-27 20:55 -0400
    Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 18:05 -0700
      Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Dave Angel <davea@davea.name> - 2013-04-27 22:02 -0400
        Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 20:42 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-28 03:51 -0400
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:39 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-04-28 09:02 +0100
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:34 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-04-28 09:05 +0100
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:38 -0700
              Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-05-01 22:00 +0100
                Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Neil Cerutti <neilc@norwich.edu> - 2013-05-02 12:50 +0000
  Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Nobody <nobody@nowhere.com> - 2013-04-28 04:53 +0100
    Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 22:06 -0700

csiph-web