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: 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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