argparse: combine current option value with positional argument

rantingrick rantingrick at gmail.com
Tue Feb 1 11:23:55 EST 2011


On Feb 1, 6:59 am, Peter Otten <__pete... at web.de> wrote:
> I'd like to capture the current value of an option --prefix=<whatever> along
> with a positional value as it is seen by argparse.


Have you seen the handy optphart module yet? I believe its in alpha2
currently but very stable.

http://tinyurl.com/optphart



More information about the Python-list mailing list