Changeset 1000 for pykota/trunk/bin
- Timestamp:
- 05/28/03 01:00:21 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pykota
r976 r1000 23 23 # 24 24 # $Log$ 25 # Revision 1.32 2003/05/27 23:00:20 jalet 26 # Big rewrite of external accounting methods. 27 # Should work well now. 28 # 25 29 # Revision 1.31 2003/04/30 13:36:39 jalet 26 30 # Stupid accounting method was added. … … 150 154 def __init__(self) : 151 155 PyKotaTool.__init__(self) 152 (self.printingsystem, self.printerhostname, self.printername, self.username, self.jobid, self.inputfile ) = self.extractInfoFromCupsOrLprng()156 (self.printingsystem, self.printerhostname, self.printername, self.username, self.jobid, self.inputfile, self.copies) = self.extractInfoFromCupsOrLprng() 153 157 self.accounter = openAccounter(self) 154 158 … … 174 178 destination = destination[1:] 175 179 printerhostname = destination.split("/")[0].split(":")[0] 176 return ("CUPS", printerhostname, os.environ.get("PRINTER"), sys.argv[2].strip(), sys.argv[1].strip(), inputfile )180 return ("CUPS", printerhostname, os.environ.get("PRINTER"), sys.argv[2].strip(), sys.argv[1].strip(), inputfile, int(sys.argv[4].strip())) 177 181 else : 178 182 # Try to detect LPRng 179 jseen = Jseen = Pseen = nseen = rseen = None183 jseen = Jseen = Pseen = nseen = rseen = Kseen = None 180 184 for arg in sys.argv : 181 185 if arg.startswith("-j") : … … 191 195 elif arg.startswith("-r") : 192 196 rseen = arg[2:].strip() 197 elif arg.startswith("-K") or arg.startswith("-#") : 198 Kseen = int(arg[2:].strip()) 199 if Kseen is None : 200 Kseen = 1 # we assume the user wants at least one copy... 193 201 if jseen and Pseen and nseen and rseen : 194 return ("LPRNG", rseen, Pseen, nseen, jseen, Jseen )195 return (None, None, None, None, None, None ) # Unknown printing system202 return ("LPRNG", rseen, Pseen, nseen, jseen, Jseen, Kseen) 203 return (None, None, None, None, None, None, None) # Unknown printing system 196 204 197 205 def acceptJob(self) :