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 Roffild
Recipients Roffild, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-11-04.20:02:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541361763.54.0.788709270274.issue35154@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, the string with spaces must be enclosed in double quotes. But when a programmer calls CreateProcess(), he himself puts double quotes or calls CommandLineToArgvW().

subprocess.list2cmdline() is always called and can spoil the launch string.

I propose to add an additional argument list2cmdline=False in subprocess.run() to disable this function.

subprocess.run(['"program path"', '/param="space space"'], list2cmdline=False)

subprocess.run('"program path" /param="space space"', list2cmdline=False)
History
Date User Action Args
2018-11-04 20:02:43Roffildsetrecipients: + Roffild, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2018-11-04 20:02:43Roffildsetmessageid: <1541361763.54.0.788709270274.issue35154@psf.upfronthosting.co.za>
2018-11-04 20:02:43Roffildlinkissue35154 messages
2018-11-04 20:02:43Roffildcreate