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


Groups > comp.lang.python > #44457

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

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Windows': 0.02; 'example:': 0.03; "'')": 0.09; 'python': 0.11; 'gui': 0.12; 'suggest': 0.14; 'windows': 0.15; '(python)': 0.16; 'arg': 0.16; 'debugger,': 0.16; 'desktop.': 0.16; 'subject: \n ': 0.16; 'subject:stopped': 0.16; 'subject:when': 0.16; 'unix,': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'trying': 0.19; 'import': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'documented': 0.24; 'replace': 0.24; 'second': 0.26; 'header:In- Reply-To:1': 0.27; '(like': 0.30; "i'm": 0.30; 'program,': 0.31; 'file': 0.32; 'supposed': 0.32; 'running': 0.33; "i'd": 0.34; "can't": 0.35; 'but': 0.35; 'really': 0.36; 'idle': 0.36; 'module.': 0.36; 'useful': 0.36; 'url:org': 0.36; 'skip:o 20': 0.38; 'stopped': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'email addr:gmail.com': 0.63; 'more': 0.64; 'chance': 0.65; 'received:74.208': 0.68; 'received:74.208.4.194': 0.84; 'x64': 0.84; 'url:image': 0.91; 'ultimate': 0.93
Date Sat, 27 Apr 2013 20:55:34 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
MIME-Version 1.0
To python-list@python.org
Subject Re: "python.exe has stopped working" when os.execl() runs on Windows 7
References <2e11de8b-f7e1-407f-a2fd-a08d5ce55d0b@googlegroups.com>
In-Reply-To <2e11de8b-f7e1-407f-a2fd-a08d5ce55d0b@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:FvlGNdte9qJkBY4/RZCDJqhR102tnp9hswRP+uTQ6Gw F6mP1EfkSvPSm3MvlY8B5Zlh97C9I8kEqOzhbHfj9KXlM8nvNw RtbN5OQmQ1sMqqOMsYvZHj66sBJFW4NqBZCEs5UBmtQRYZr06k aA2P4PjcLUnps9pDPdUBUjKBW/sF40pK2LZOiCFA56Df6h1Dt0 KbHMx5RxEThP8IzKWSJ+eR+tNgqY1BY9B2k7feGoVpLmld6Q8Q +CpjT6NqTTVDeNNke59wmkmvscZplQvFK240dgilvUbJkZ0sZ6 oel+D/w84uvLLdXjp4D6QqLfe27XpbY4Jnvh9M583moYDzT3A= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1131.1367110561.3114.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367110561 news.xs4all.nl 15865 [2001:888:2000:d::a6]:46294
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44457

Show key headers only | View raw


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