Parse a string into argv-like list like OS does

python at bdurham.com python at bdurham.com
Sun Aug 1 15:12:46 CEST 2010


Before I reinvent the wheel, is there a module that provides a
command-line like parser that I can use? By command-line like
parser, I mean that I would like to pass a string to this
function and get back a list in the same manner as the OS
receives a command line string which it parses into discrete
items (handling quoted strings, backslashes, etc)

I have a bunch of command lines (as strings) and I would like to
parse them into argv-like lists for analysis and documentation.

Thank you,
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100801/8f517e47/attachment.html>


More information about the Python-list mailing list