import getopt
使用语法:getopt.getopt(args, options[, long_options])
参数说明:options是单字符,long_options表示字符串
返回结果:是一个list,每个list的项为(选项,值)的元组对
具体实例:#ping -c 12 -6 -s 1024 –help –size 1024
处理结果:
getopt.getopt(sys.argv[1:], ”c:s:6”, [“size=”,”help”])
[('-c', '12'), ('-6', ''), ('-s', '1024'), (“—help”,””), (“--s



