/[papo]/papo/print/print.py
ViewVC logotype

Diff of /papo/print/print.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by styxman, Mon Apr 21 18:19:00 2003 UTC revision 1.4 by styxman, Tue Jun 10 19:50:50 2003 UTC
# Line 88  f= open (dataFile, 'r') Line 88  f= open (dataFile, 'r')
88  line= f.readline ()  line= f.readline ()
89  headerData= splitAndClean (line)  headerData= splitAndClean (line)
90  for field in headerFields:  for field in headerFields:
91    data[field]= headerData.pop (0)    try:
92        data[field]= headerData.pop (0)
93      except IndexError:
94        # not enought data in the first line; try the next one
95        line= f.readline ()
96        headerData= splitAndClean (line)
97        # if it fails here, something must be wrong
98        data[field]= headerData.pop (0)
99    
100  # take only the date, not the time  # take only the date, not the time
101  # again a hackery  # again a hackery
102  (data['date'], None)= data['date'].split (' ')  data['date']= data['date'].split (' ')[0]
103  # now comes the detail rows  # now comes the detail rows
104  line= f.readline ()  line= f.readline ()
105  dataFields= splitAndClean (line)  dataFields= splitAndClean (line)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26