Customized command line parsing in Python
Posted
by Moshe
on Stack Overflow
See other posts from Stack Overflow
or by Moshe
Published on 2008-10-01T09:35:36Z
Indexed on
2010/04/16
14:23 UTC
Read the original article
Hit count: 241
I'm writing a shell for a project of mine, which by design parses commands that looks like this:
COMMAND_NAME ARG1="Long Value" ARG2=123 [email protected]
My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' in front of the arguments. This behavior doesn't match my requirements.
Any ideas how can this be solved? Any existing library for this?
© Stack Overflow or respective owner