标签:style blog color os 文件 div sp log on
举个例子:
import csv import os path=‘/tmp/‘ file=‘test.csv‘ def generate_csv(path,file): if not os.path.exists(path): os.mkdir(path) files=os.path.join(path,file) # os.system(‘touch %s‘ %files) with open(files,‘w‘) as f: writer=csv.writer(f) writer.writerow([‘client_name‘,‘os..‘,‘path‘]) return files def main(): generate_csv(path,file) if __name__==‘__main__‘: main()
标签:style blog color os 文件 div sp log on
原文地址:http://www.cnblogs.com/alexkn/p/3968554.html