def setupArgparse():
    """Sets up argparse module to create command line options and parse them.

    Uses the argparse module to add arguments to the command line for
    faradayio-cli. Once the arguments are added and parsed the arguments are
    returned

    Returns:
        argparse.Namespace: Populated namespace of arguments
    """
    parser = argparse.ArgumentParser()

    # Required arguments
    parser.add_argument("callsign", help="Callsign of radio")
    parser.add_argument("id", type=int, help="ID number radio")

    # Optional arguments
    parser.add_argument("-l", "--loopback", action="store_true",
                        help="Use software loopback serial port")
    parser.add_argument("-p", "--port", default="/dev/ttyUSB0",
                        help="Physical serial port of radio")

    # Parse and return arguments
    return parser.parse_args()
def setupArgparse ( ) : parser = argparse . ArgumentParser ( ) parser . add_argument ( "callsign" , help = "Callsign of radio" ) parser . add_argument ( "id" , type = int , help = "ID number radio" ) parser . add_argument ( "-l" , "--loopback" , action = "store_true" , help = "Use software loopback serial port" ) parser . add_argument ( "-p" , "--port" , default = "/dev/ttyUSB0" , help = "Physical serial port of radio" ) return parser . parse_args ( )
Sets up argparse module to create command line options and parse them.

    Uses the argparse module to add arguments to the command line for
    faradayio-cli. Once the arguments are added and parsed the arguments are
    returned

    Returns:
        argparse.Namespace: Populated namespace of arguments