Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'args': 0.05; 'parameter': 0.05; 'terry': 0.07; 'python': 0.08; 'caller': 0.09; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'inclined': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'subject:access': 0.09; 'way;': 0.09; 'am,': 0.12; 'arg': 0.16; 'possibly,': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'reedy': 0.16; 'subject:issues': 0.16; 'sys.argv[0]': 0.16; 'win7': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; '>>>': 0.18; 'help.': 0.19; 'cc:no real name:2**0': 0.20; 'seems': 0.20; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'indicating': 0.23; 'optional': 0.23; 'suggestion': 0.26; '(in': 0.26; "i'm": 0.27; 'right.': 0.28; 'import': 0.28; 'pass': 0.29; 'fixed': 0.29; 'fix': 0.29; 'second': 0.29; 'cc:addr:python.org': 0.30; 'not.': 0.30; 'argue': 0.30; 'tjg': 0.30; 'change.': 0.32; 'done': 0.34; "i'll": 0.34; 'header:User-Agent:1': 0.34; 'yesterday': 0.34; 'apply': 0.35; '(with': 0.35; 'element': 0.37; 'but': 0.37; 'something': 0.37; 'could': 0.38; 'think': 0.38; 'patch': 0.38; 'some': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'subject:with': 0.39; 'why': 0.39; "i'd": 0.40; "it's": 0.40; 'took': 0.63; 'from:addr:mail': 0.64; 'cause': 0.67; 'glad': 0.70; 'become': 0.71; 'automatic': 0.72; 'golden': 0.73; 'future,': 0.76; 'to:none': 0.93; 'obvious,': 0.93 Date: Fri, 28 Oct 2011 09:22:00 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: spawnl issues with Win 7 access rights References: <4308935.65.1319502062676.JavaMail.geo-discussion-forums@prfq1> <047ec741-9164-4b0e-bb24-f71e3ab1e39b@gk10g2000vbb.googlegroups.com> <4EA6A950.6090706@timgolden.me.uk> <4EA81B72.7040008@timgolden.me.uk> <98460dba-9e08-4d1a-8bf6-4e8fdbea2d0c@19g2000yqk.googlegroups.com> <4EA93421.1090905@timgolden.me.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1319790130 news.xs4all.nl 6884 [2001:888:2000:d::a6]:48634 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15096 On 27/10/2011 20:53, Terry Reedy wrote: > On 10/27/2011 6:36 AM, Tim Golden wrote: >> On 27/10/2011 11:27, Propad wrote: >>> the suggestion to add the optional second parameter fixed the problem, >>> spawnl now works on the Win 7 computer I'm responsible for (with >>> Python 2.2). So the suggested cause seems to be right. >> >> FWIW, although it's not obvious, the args parameter to spawnl >> is intended to become the sys.args (in Python terms) of the >> newly-spawned process. Which is why the first element is expected >> to be the name of the process. It took me some time to realise >> this myself :) >> >> Anyway, glad we could be of help. > > Can we make this fix automatic for Win7 to fix #8036? > It's tempting, but I think not. In principle, the caller can pass any value as the first arg of spawn: it'll simply end up as sys.argv[0] in Python terms. If spawnl were the way of the future, I'd be inclined to argue for the change. As it it, though, I'd simply apply the patch and, possibly, add a line to the docs indicating that the args must be non-empty. (I started to import the patch yesterday but something got in the way; I'll see if I can get it done today). TJG