Top "Argparse" questions

A Python module for implementing command-line interfaces

Allowing specific values for an Argparse argument

Is it possible to require that an argparse argument be one of a few preset values? My current approach would …

python argparse
python argh/argparse: How can I pass a list as a command-line argument?

I'm trying to pass a list of arguments to a python script using the argh library. Something that can take …

python command-line-arguments argparse argh
directory path types with argparse

My python script needs to read files from a directory passed on the command line. I have defined a readable_…

python argparse
Python argparse mutual exclusive group

What I need is: pro [-a xxx | [-b yyy -c zzz]] I tried this but does not work. Could someone …

python argparse
Call function based on argparse

I'm new to python and currently playing with it. I have a script which does some API Calls to an …

python argparse
Python argparse: Make at least one argument required

I've been using argparse for a Python program that can -process, -upload or both: parser = argparse.ArgumentParser(description='Log archiver …

python argparse
Using the same option multiple times in Python's argparse

I'm trying to write a script that accepts multiple input sources and does something to each one. Something like this ./…

python argparse multiple-arguments
python argparse choices with a default choice

I'm trying to use argparse in a Python 3 application where there's an explicit list of choices, but a default if …

python python-3.x argparse
Specify format for input arguments argparse python

I have a python script that requires some command line inputs and I am using argparse for parsing them. I …

python python-2.7 argparse
Argparse: Required argument 'y' if 'x' is present

I have a requirement as follows: ./xyifier --prox --lport lport --rport rport for the argument prox , I use action='store_…

python argparse