Philip Jenvey <pjen...@underboss.org> added the comment:

The code I linked to above implements those semantics in pure Python. It 
follows Microsoft's "Parsing C Command-Line Arguments" rules like 
CommandLineToArgvW does

Here's updated links, the older links seemed to have broken:

https://fisheye3.atlassian.com/browse/jython/trunk/jython/Lib/subprocess.py?r=6636#to566

tests: 
https://fisheye3.atlassian.com/browse/jython/trunk/jython/Lib/test/test_subprocess_jy.py?r=6464#to41

This code is basically the inverse of subprocess's list2cmdline

I don't mind incorporating this code into the stdlib, but we need to figure out 
where it would go. There was a discussion on stdlib-sig last year related to 
this topic, about the need for quoting and unquoting command lines.

We have some of this functionality for posix systems scattered throughout shlex 
and the pipes module, and then there's subprocess.list2cmdline. I think we 
could use a new module with all this functionality in one place.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1724822>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to