I want to use argparse to parse command lines of form \"arg=val\" For example, the usage would be:
script.py conf_dir=/tmp/good_conf
To ach
You need a custom action
class StoreNameValuePair(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): n, v = values.split('=') setattr(namespace, n, v) args = parser.add_argument("conf_dir", action=StoreNameValuePair)