title: need help for python command line argument using argparse
body: <p>I need some help regarding using argparse. What I want to achieve is that I need to pass in only one argument, it could be one of the followings: <code>--k, --r, --b, --p,(ignore the rest)</code>. If the argument count is not 1, print "usage" information and quit. Also the program needs to know which flag is passed in in order to create corresponding object. I tried several times but I doesn't work, can anyone give me a hint on this? Thanks.</p>