python选项参数
#!c:python26python.exeimport optparsedef main(): MSG_USAGE = "opt.py [-s <serverip>][-p <port>]" p = optparse.OptionParser(MSG_USAGE) p.add_option('-s','--server',default="127.0.0.1",help="Server ip your self with this option.") p.add_option('-p','--port',default="6666",type="int",help="Server port your self with this option.") p.add_option('-c','--client',default="localhost",help="Client ip yo