We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script
from __future__ import print_function import cdp parser = cdp.cdp_parser.CDPParser() parser.add_argument("-a","--Aarg",default=7,help="A value",required=True) parser.add_argument("-b","--Barg",default=8,help="A value") parser.add_argument("-c","--Carg",default=9,help="A value") parser.add_argument("-d","--Darg",default=6,help="A value") P = parser.get_parameters()[0] print("A:",P.Aarg) print("B:",P.Barg) print("C:",P.Carg) print("D:",P.Darg)
myparam.py
Aarg=10 Barg=11 Carg=12 Darg=13
runnnig with -p myparam:
doutriaux1@crunchy:[~]:[20530]> python test_cdp_param.py -p myparam.py usage: test_cdp_param.py [-h] [-p PARAMETERS] [--diags OTHER_PARAMETERS [OTHER_PARAMETERS ...]] [-n NUM_WORKERS] [--scheduler_addr SCHEDULER_ADDR] [-g GRANULATE [GRANULATE ...]] -a AARG [-b BARG] [-c CARG] [-d DARG] test_cdp_param.py: error: the following arguments are required: -a/--Aarg
The text was updated successfully, but these errors were encountered:
zshaheen
No branches or pull requests
script
myparam.py
runnnig with -p myparam:
The text was updated successfully, but these errors were encountered: