diff options
Diffstat (limited to 'cmdline.py')
-rw-r--r-- | cmdline.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,5 +1,9 @@ +""" cmdline.py - komentorivin käsittely argparse moduulilla """ +import sys from argparse import ArgumentParser +from tui import KEY_DESCRIPTIONS + parser = ArgumentParser( prog='miinaharava', description='Klassisen miinaharavapelin terminaali toteutus.', @@ -99,3 +103,10 @@ misc_group.add_argument( args = parser.parse_args() +if args.help: + parser.print_help() + sys.exit() + +if args.keys: + print(end=KEY_DESCRIPTIONS) + sys.exit() |