()
return rst
解析命令行参数
	:return: 命令行参数命名空间
解析命令行参数
	:return: 命令行参数命名空间
解析命令行参数 : return : 命令行参数命名空间
def get_args():
	'''
	解析命令行参数
	:return: 命令行参数命名空间
	'''
	parser = argparse.ArgumentParser()
	parser.add_argument('-host', action='store', dest='host', type=str, help='receive host ip')
	parser.add_argument('-port', action='store', dest='dport', type=str, help='send port')
	parser.add_argument('-c', action='store', dest='count', type=str, help='count number')
	# parser.add_argument('-f', action='store', dest='file', type=str, help='packets file')
	# parser.add_argument('-t', action='store', dest='thread', type=str, help='thread number')
	rst = parser.parse_args()
	return rst
def get_args ( ) : parser = argparse . ArgumentParser ( ) parser . add_argument ( '-host' , action = 'store' , dest = 'host' , type = str , help = 'receive host ip' ) parser . add_argument ( '-port' , action = 'store' , dest = 'dport' , type = str , help = 'send port' ) parser . add_argument ( '-c' , action = 'store' , dest = 'count' , type = str , help = 'count number' ) # parser.add_argument('-f', action='store', dest='file', type=str, help='packets file') # parser.add_argument('-t', action='store', dest='thread', type=str, help='thread number') rst = parser . parse_args ( ) return rst