About 54 results
Open links in new tab
  1. 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 function argument …

  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. python - Arguments that are dependent on other arguments with …

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

  4. how to make argument optional in python argparse

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

  5. argparse - python argument with or without value, specified or not ...

    Jun 15, 2018 · python argument with or without value, specified or not Asked 7 years, 8 months ago Modified 4 years, 9 months ago Viewed 9k times

  6. Conditional command line arguments in Python using argparse

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

  7. Make argparse treat dashes and underscore identically

    Nov 28, 2018 · An alternative is to subclass argparse.ArgumentParser to make the matching invariant to replacing dashes by underscore. This requires a little bit of fiddling, as both …

  8. How to pass and parse a list of strings from command line with …

    May 4, 2017 · How to pass and parse a list of strings from command line with argparse.ArgumentParser in Python? Asked 8 years, 9 months ago Modified 2 years ago Viewed 117k times

  9. python - Print command line arguments with argparse? - Stack Overflow

    Jan 25, 2016 · I am using argparse to parse command line arguments. To aid debugging, I would like to print a line with the arguments which with the Python script was called. Is there a simple way to do …

  10. python - Check if argparse optional argument is set or not - Stack …

    May 27, 2015 · What would isset() be (hint: Python is not PHP)? Did you mean hasattr() instead, perhaps? Why not configure argparse to set a default for an option instead?