Skip to content

Instantly share code, notes, and snippets.

@mabdi
Created April 23, 2020 09:57
Show Gist options
  • Save mabdi/29caefa04f143fb0f46ed03d2e02cb59 to your computer and use it in GitHub Desktop.
Save mabdi/29caefa04f143fb0f46ed03d2e02cb59 to your computer and use it in GitHub Desktop.
Python read command-line args
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