import argparse AVAILABLE_COMMANDS_HELP_STRING = """Available commands: row-at n: print row at the nth position get-rows n: print first n rows insert "csv string": insert row at the end, the row must have exactly 3 elements. search "lookup": search "lookup" in the table. """ class ArgParser: def __init__(self): self.parser = argparse.ArgumentParser() self.parser.add_argument('-f', required=True, help='CSV file location') self.parser.add_argument('-c', required=True, help=AVAILABLE_COMMANDS_HELP_STRING, nargs=2) self.args = self.parser.parse_args() print(self.args)