def parsearg(): global Server_Time parser = argparse.ArgumentParser(description='Get zengfu') parser.add_argument('-s', '--server_time', required=False, type=str, metavar='5:0:1', help='the server time will action') res = parser.parse_args() if res.server_time: Server_Time = util.server_time_to_sec(res.server_time) else: Server_Time = 0