I have a script which is to be used like this: usage:installer.py dir [-h] [-v]
Here, dir is a positional argument that is defined as:
parser.add_argument('dir', default=os.getcwd())
I want to make dir optional I.e, it should be cwd when it is not specified.
But, the problem is when I don’t specify the dir argument it gives this error:
Error: Too few arguments.