About 12,700,000 results
Open links in new tab
  1. Conditional command line arguments in Python using argparse

    Feb 29, 2012 · Conditional command line arguments in Python using argparse Asked 13 years, 10 months ago Modified 3 years, 3 months ago Viewed 41k times

  2. python - How can I pass a list as a command-line argument with …

    I am trying to pass a list as an argument to a command line program. Is there an argparse option to pass a list as option? parser.add_argument('-l', '--list', type=list, acti...

  3. What's the best way to parse command line arguments?

    16 Lightweight command line argument defaults Although argparse is great and is the right answer for fully documented command line switches and advanced features, you can use …

  4. How to handle variable number of arguments (nargs='*')

    The relevant Python bug is Issue 15112. argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional When argparse parses ['1', '2', '- …

  5. python - Arguments that are dependent on other arguments with …

    Arguments that are dependent on other arguments with Argparse Asked 11 years, 1 month ago Modified 6 years ago Viewed 53k times

  6. python - Why use argparse rather than optparse? - Stack Overflow

    I noticed that the Python 2.7 documentation includes yet another command-line parsing module. In addition to getopt and optparse we now have argparse. Why has yet another command-line …

  7. Argparse: Required argument 'y' if 'x' is present - Stack Overflow

    Oct 17, 2013 · Argparse: Required argument 'y' if 'x' is present Asked 12 years, 2 months ago Modified 3 years, 8 months ago Viewed 96k times

  8. python - Setting options from environment variables when using …

    30 ConfigArgParse adds support for environment variables to argparse, so you can do things like:

  9. python - Parsing boolean values with argparse - Stack Overflow

    @AnatolyAlekseev, argparse developers are fully aware that some users try to handle strings like "True" or "False" as booleans, but have rejected proposals to redefine the basic Python bool …

  10. how to make argument optional in python argparse

    how to make argument optional in python argparse Asked 12 years, 9 months ago Modified 4 years, 8 months ago Viewed 70k times