def validate(parser, value):
    if value not in ('foo', 'bar'):
        parser.error('{} not valid column'.format(value))
parser = argparse.ArgumentParser()
How to combine interactive prompting with argparse in python?