#Write array values into file
##data数据如下
cpu_load_short,host=server02 value=0.67cpu_load_short,host=server02,region=us-west value=0.55 1422568543702900257cpu_load_short,direction=in,host=server01,region=us-west value=2.0 1422568543702900257
##向文件中插入一个array
file = open('cpu_info_data.txt','w+')try: for line in data: file.write(line) file.closeexcept Exception, e: raise e
##参考: