Exercise: argparse positional and named
Create a script that can accept any number of filenames, the named parameter --machine
and the flag --verbose
.
Like this:
python ex.py file1 file2 file3 --machine MACHINE --verbose
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Create a script that can accept any number of filenames, the named parameter --machine
and the flag --verbose
.
Like this:
python ex.py file1 file2 file3 --machine MACHINE --verbose