KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a script which is meant to be used like this: usage: installer.py dir [-h] [-v] dir is a positional argument which is defined like this: parser.add_argument('dir', default=os.getcwd()) I want the dir to be optional: when it's not specified it should just be cwd . Unfortunately, when I don't specify the dir argument, I get Error: Too few arguments .
Tags (comma-separated)
Save Edits
Cancel