This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients BreamoreBoy, Saimadhav.Heblikar, The Compiler, r.david.murray, rhettinger, zach.ware
Date 2014-07-14.01:53:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405302835.48.0.587778140669.issue20451@psf.upfronthosting.co.za>
In-reply-to
Content
> I believe the problem lies with the way that Windows implements 
> the 'exec' functions.

Yes, that is that cause of the observed behavior.  See the first note in the remarks section on the relevant MSDN entry at http://msdn.microsoft.com/en-us/library/431x4c1w.aspx :

"""
Spaces embedded in strings may cause unexpected behavior; for example, passing _exec the string "hi there" will result in the new process getting two arguments, "hi" and "there". If the intent was to have the new process open a file named "hi there", the process would fail. You can avoid this by quoting the string: "\"hi there\"".
"""

The 'exec' functions are more low level and more arcane than most people would like.  Python exposes that functionality with all its beauty and all its warts.  David Murray is right in saying that you likely need one of the higher level modules such as subprocess with shell=True.

I looked through the code in Modules/posixmodule.c and didn't any code on our part that exacerbates the behavior.

Knowing that the cause is the underlying function still leaves the question of whether to apply a patch the mitigates the problem (possibly breaking some code that relies on the existing behavior) or whether to live with the facts-of-life that accompany low level O/S functions.
History
Date User Action Args
2014-07-14 01:53:55rhettingersetrecipients: + rhettinger, r.david.murray, BreamoreBoy, zach.ware, Saimadhav.Heblikar, The Compiler
2014-07-14 01:53:55rhettingersetmessageid: <1405302835.48.0.587778140669.issue20451@psf.upfronthosting.co.za>
2014-07-14 01:53:55rhettingerlinkissue20451 messages
2014-07-14 01:53:55rhettingercreate