Skip to content

Instantly share code, notes, and snippets.

@search5
Created April 23, 2024 21:30
Show Gist options
  • Save search5/d481f5fde66e0e4decce8f7ee1fe6a7b to your computer and use it in GitHub Desktop.
Save search5/d481f5fde66e0e4decce8f7ee1fe6a7b to your computer and use it in GitHub Desktop.
import argparse
def main():
parser = argparse.ArgumentParser(
prog=__file__,
description='What the program does',
epilog='Text at the bottom of help')
parser.add_argument('filename', nargs='?', choices=['install', 'update', 'remove'])
args = parser.parse_args()
print(args)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment