Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!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.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; 'jan': 0.12; 'windows': 0.15; 'ah,': 0.16; 'attempt.': 0.16; 'extension,': 0.16; 'extension.': 0.16; 'quoted': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 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; 'there': 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; 'pm,': 0.38; 'does': 0.39; 'received:71': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'hope': 0.61; '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; 'received:fios.verizon.net': 0.84; '8bit%:18': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Success with subprocess communicate on Windows? Date: Wed, 02 Jul 2014 19:14:13 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Gmane-NNTP-Posting-Host: pool-71-175-90-87.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; 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: 52 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404342893 news.xs4all.nl 2861 [2001:888:2000:d::a6]:53826 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73855 On 7/2/2014 1:37 PM, Wolfgang Maier wrote: > 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 Windo= ws >> 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=3D= vs.85%29.aspx): >> >> >> >> >> If lpApplicationName is NULL, the first white space=E2=80=93delimited = token of >> the command line specifies the module name. If you are using a long fi= le >> 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. I appreciate the attempt. I hope there is someone who has been=20 successful who can answer ;-). --=20 Terry Jan Reedy