I'm not able to find any examples to parse the arguments in the way I need to. The names that have a : in them are a known list (30 of them), the value after them may or may not have values, however some are required.
creatAlert.py call_type: I alert_id: 25 message: STATUS OF AGENT PLATFORM notes:
So I have tried to just parse the call_type: I with no luck. What am I missing to get 'I' in the call_type variable?
parser = argparse.ArgumentParser()
parser.add_argument("call_type:", type=str, help="Testing")
args = parser.parse_args()
print args.call_type
Is there a special trick required to handle the message argument that has spaces in it?