#!/usr/bin/python # -*- coding:utf-8 -*- from time import strftime import sys # 获取命令行参数 args = sys.argv print(args[1]) file1 = open('rizhi.txt','a') file1.write(args[1]+" "+strftime("%Y-%m-%d-%H-%M-%S")+'\n')