我想处理文件“output.log”中的数据并将其提供给graphdata['eth0]
我已经这样做了,但它只处理第一行:
logread = open("output.log", "r").readlines()
for line in logread:
print "line", line
i = line.rstrip("\n")
b = float(i)
colors = [ (0.2, 03, .65), (0.5, 0.7, .1), (.35, .2, .45), ]
graphData = {}
graphData['eth0'] = [b]
cairoplot.dot_line_plot("./blog", graphData, 500, 500, axis=True, grid=True, dots=True, series_colors=colors)