I want to have some options in argparse module such as --pm-export however when I try to use it like args.pm-export I get the error that there is n
--pm-export
args.pm-export
Dashes are converted to underscores:
import argparse pa = argparse.ArgumentParser() pa.add_argument('--foo-bar') args = pa.parse_args(['--foo-bar', '24']) print args # Namespace(foo_bar='24')