Changeset 1099 for pykota/trunk/bin
- Timestamp:
- 07/25/03 12:41:30 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pykotme
r1057 r1099 23 23 # 24 24 # $Log$ 25 # Revision 1.2 2003/07/25 10:41:29 jalet 26 # Better documentation. 27 # pykotme now displays the current user's account balance. 28 # Some test changed in ldap module. 29 # 25 30 # Revision 1.1 2003/07/03 09:44:01 jalet 26 31 # Now includes the pykotme utility … … 32 37 import os 33 38 import pwd 34 import grp35 39 36 40 from pykota import version … … 116 120 stream.close() 117 121 122 # get current user 123 uid = os.geteuid() 124 username = pwd.getpwuid(uid)[0] 125 user = self.storage.getUser(username) 126 if user.Exists and user.LimitBy and (user.LimitBy.lower() == "balance"): 127 print _("Your account balance : %.2f") % (user.AccountBalance or 0.0) 128 118 129 printers = self.storage.getMatchingPrinters(options["printer"]) 119 130 if not printers : 120 131 raise PyKotaToolError, _("There's no printer matching %s") % options["printer"] 132 121 133 print _("Job size : %i pages") % nbpages 122 134 for printer in printers :