eight_bit_computer.cli module¶
-
eight_bit_computer.cli.get_assemble_parser()[source]¶ Generate arg parser for the ebc_assemble command line script.
Returns: The argument parser. Return type: argparse.ArgumentParser
-
eight_bit_computer.cli.positive_int(value)[source]¶ Validate a string is an int greater than or equal to zero.
Used for the type argument in an argparse.ArgumentParser.add_argument call.
Parameters: value (str) – Value to be tested. Returns: Value as an integer if it was >= 0. Return type: int Raises: argparse.ArgumentTypeError– If the value was not greater than or equal to zero.