How do I create a Python namespace (argparse.parse_args value)?
How do I create a Python namespace (argparse.parse_args value)? Question: To interactively test my python script, I would like to create a Namespace object, similar to what would be returned by argparse.parse_args(). The obvious way, >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.parse_args() Namespace() >>> parser.parse_args(“-a”) usage: [-h] : error: unrecognized arguments: – a …