Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Windows': 0.02; 'string.': 0.05; 'args': 0.07; 'url:msdn': 0.07; 'string': 0.09; 'arguments': 0.09; 'executable': 0.09; 'explanation': 0.09; 'imply': 0.09; 'null,': 0.09; 'parameter': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows': 0.15; 'ah,': 0.16; 'extension,': 0.16; 'extension.': 0.16; 'quoted': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sequence.': 0.16; 'url:85)': 0.16; 'url:aspx)': 0.16; 'url:windows': 0.16; 'wrote:': 0.18; 'module': 0.19; 'seems': 0.21; 'command': 0.22; 'header :User-Agent:1': 0.23; 'specifies': 0.24; '(see': 0.26; 'extension': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'forgot': 0.30; 'gather': 0.31; 'searches': 0.31; 'file': 0.32; 'probably': 0.32; 'says': 0.33; 'period': 0.33; 'subject:with': 0.35; 'but': 0.35; 'add': 0.35; 'subject:?': 0.36; 'example,': 0.37; 'url:microsoft': 0.37; 'ends': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'name': 0.63; 'therefore,': 0.64; 'url:en-us': 0.68; 'default': 0.69; 'url:%1': 0.72; 'behavior': 0.77; '100%': 0.77; '.com': 0.84; 'sorry.': 0.91; '8bit%:18': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Wolfgang Maier Subject: Re: Success with subprocess communicate on Windows? Date: Wed, 02 Jul 2014 19:37:03 +0200 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: bio-192-52-34-153.mobile.uni-freiburg.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404322643 news.xs4all.nl 2911 [2001:888:2000:d::a6]:50881 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73844 On 02.07.2014 19:31, Wolfgang Maier wrote: > > I am not 100% sure whether that is the problem, but from what I gather > from the subprocess module docs the args string is passed to the Windows > CreateProcess function as a single string. > To me this seems to imply that it is passed as the lpCommandLine > parameter (with Null for the lpApplicationName parameter). > This is what Microsoft says about this case > (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx): > > > > If lpApplicationName is NULL, the first white space–delimited token of > the command line specifies the module name. If you are using a long file > name that contains a space, use quoted strings to indicate where the > file name ends and the arguments begin (see the explanation for the > lpApplicationName parameter). If the file name does not contain an > extension, .exe is appended. Therefore, if the file name extension is > .com, this parameter must include the .com extension. If the file name > ends in a period (.) with no extension, or if the file name contains a > path, .exe is not appended. If the file name does not contain a > directory path, the system searches for the executable file in the > following sequence. > > > So in your case the default behavior would be to add an .exe extension > to pyflakes, which is probably not what you intended ? > > Best, > Wolfgang > Ah, I forgot about your pyflakes -h example, which works, so my explanation must be wrong. Sorry.