Changeset 1578 for pykota/trunk/bin
- Timestamp:
- 06/29/04 09:53:11 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkhint
r1546 r1578 24 24 # 25 25 # $Log$ 26 # Revision 1.12 2004/06/29 07:53:11 jalet 27 # Improved pkhint 28 # 26 29 # Revision 1.11 2004/06/18 13:34:48 jalet 27 30 # Now all tracebacks include PyKota's version number … … 122 125 '/bin/nc -w 2 %(printer)s %(port)s </usr/share/pykota/pagecount.pjl 2>/dev/null | /usr/bin/tail -2', \ 123 126 ] 124 127 125 128 class PKHint(PyKotaTool) : 126 129 """A class to autodetect the best accounting method for printers.""" … … 236 239 accounter = 'hardware(' + netpjlcommand + ')' 237 240 configuration.append((printer, accounter)) 238 elif devicetype == "direct" : 239 sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 240 elif devicetype == "serial" : 241 sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 241 else : 242 configuration.append((printer, "software(/usr/bin/pkpgcounter)")) 243 # elif devicetype == "direct" : 244 # sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 245 #elif devicetype == "serial" : 246 # sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 247 #else : 248 # sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 242 249 else : 243 sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer))250 configuration.append((printer, "software(/usr/bin/pkpgcounter)")) 244 251 245 252 if not configuration : … … 247 254 else : 248 255 print "\nPut the following lines into your /etc/pykota/pykota.conf file :\n" 256 print "# BEWARE : if software accounting is suggested, this doesn't mean" 257 print "# that hardware accounting wouldn't work, this only means that PyKota" 258 print "# wasn't able to autodetect which hardware accounting method to use." 249 259 for (printer, accounter) in configuration : 250 260 print "[%s]" % printer … … 254 264 if __name__ == "__main__" : 255 265 sys.stderr.write("BEWARE : This tool doesn't support LPRng's printcap files yet.\n") 256 sys.stderr.write("This tool is currently highly experimental, so don't rely on it.\n")257 266 retcode = 0 258 267 try :