Message54306
When parsing command line options, I found very useful
to have an
option with a facultative value, able to do the following:
1-tell to me if the option was or was not seen on the
command line, return the value None if the option was
not seen;
2-if the option only was specified, return a default value.
3-if the option with a value was specified on the
command line, return the specified value;
A way to reach this goal can be the addition of a new
value for the options actions in module optparse, it
may be something like "store_with_default".
|
|
Date |
User |
Action |
Args |
2007-08-23 16:08:33 | admin | link | issue1073198 messages |
2007-08-23 16:08:33 | admin | create | |
|