1
2 """Output of time-dependent data"""
3
4 from BasicFile import BasicFile
5
7 """output of time dependent data"""
8
17
18
19
20
22 """
23 Sets the titles anew. Only has an effect if the file hasn't been opened yet
24
25 @param titles: The new titles
26 """
27 self.titles=titles
28
30 """
31 Write column titles if present
32 """
33 if len(self.titles)>0:
34 fh=self.getHandle()
35 fh.write("# time")
36 for c in self.titles:
37 fh.write(" \t"+c)
38 fh.write("\n")
39
40 - def write(self,time,data):
41 """write data set
42
43 @param time: the current time
44 @param data: tuple with data"""
45 self.writeLine( (time,)+data)
46