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 eric.smith
Recipients Alexander.Belopolsky, Christophe Simonis, brian.curtin, csernazs, eric.smith, larry, r.david.murray
Date 2010-06-09.00:15:35
SpamBayes Score 0.0017397872
Marked as misclassified No
Message-id <1276042537.89.0.665237148268.issue7839@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with David. For the issue raised here, at most I would make (list, shell=True) and (str, shell=False) raise errors.

There's an issue (that I can't find right now) for creating functions that convert from str->list and list->str for cases such as this. shlex is sort of str->list, but it has issues on Windows. I've mentioned elsewhere that for Windows list->str is not always possible, because there is no standard for the corresponding str->list that each program is responsible for.

On Unix-like systems, when the called programs are run they get a pre-parsed list (argv). This list is created by the caller, either directly or through a shell. When a shell is doing this, at least the behavior is somewhat standard.

On Windows, the called programs get a string, and they're in charge of parsing it, if they want to. Many programs use the C library to create argv, but exactly how that parsing works changes between runtime vendors and over time within a vendor. There's no solution that will work in all cases.

Which is not to suggest that we shouldn't try, just that it will be hard.
History
Date User Action Args
2010-06-09 00:15:38eric.smithsetrecipients: + eric.smith, csernazs, larry, Christophe Simonis, r.david.murray, brian.curtin, Alexander.Belopolsky
2010-06-09 00:15:37eric.smithsetmessageid: <1276042537.89.0.665237148268.issue7839@psf.upfronthosting.co.za>
2010-06-09 00:15:36eric.smithlinkissue7839 messages
2010-06-09 00:15:35eric.smithcreate