Native way no libraries

suggest change
"""
usage: sub <command>

commands:

  status -  show status
  list   -  print list
"""

import sys

def check():
    print("status")
    return 0

if sys.argv[1:] == ['status']:
    sys.exit(check())
elif sys.argv[1:] == ['list']:
    print("list")
else:
    print(__doc__.strip())

Output without arguments:

usage: sub <command>

commands:

  status -  show status
  list   -  print list

Pros:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents