Changeset 976 for pykota/trunk/bin
- Timestamp:
- 04/30/03 15:36:40 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pykota
r975 r976 23 23 # 24 24 # $Log$ 25 # Revision 1.31 2003/04/30 13:36:39 jalet 26 # Stupid accounting method was added. 27 # 25 28 # Revision 1.30 2003/04/29 22:03:38 jalet 26 29 # Better error handling. … … 192 195 return (None, None, None, None, None, None) # Unknown printing system 193 196 194 def filterInput(self, inputfile) :195 """Transparent filter."""196 mustclose = 0197 if inputfile is not None :198 infile = open(inputfile, "rb")199 mustclose = 1200 else :201 infile = sys.stdin202 data = infile.read(256*1024)203 while data :204 sys.stdout.write(data)205 data = infile.read(256*1024)206 if mustclose :207 infile.close()208 209 197 def acceptJob(self) : 210 198 """Returns the exit code needed by the printing backend to accept the job and print it.""" … … 270 258 271 259 # pass the job untouched to the underlying layer 272 kotafilter. filterInput(kotafilter.inputfile)260 kotafilter.accounter.filterInput(kotafilter.inputfile) 273 261 274 262 return kotafilter.acceptJob()