[issue1521950] shlex.split() does not tokenize like the shell

Vinay Sajip report at bugs.python.org
Thu Feb 23 11:08:34 CET 2012


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

>Éric Araujo <merwok at netwok.org> added the comment:

>I did not fully get what you meant here, but the example you added to the doc made it clear.  Is this covered by tests?

Yes, I believe that testSyntaxSplitCustom covers this.

>Overall great patch!  Dan, do you have time to test it (or read the new examples in the patch) to tell us if it meets what you wanted?

Thanks! It was a bit fiddly, shlex is somewhat difficult to extend cleanly. I developed this functionality for a subprocess ease-of-use-wrapper module called sarge, and I had to basically copy and modify the whole read_token method :-(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1521950>
_______________________________________


More information about the Python-bugs-list mailing list