Created
April 23, 2020 09:57
-
-
Save mabdi/29caefa04f143fb0f46ed03d2e02cb59 to your computer and use it in GitHub Desktop.
Python read command-line args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
try: | |
project = sys.argv[1] | |
prefix = sys.argv[2] | |
except IndexError: | |
raise SystemExit(f"Usage: {sys.argv[0]} <project-name> <packages prefix>") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment