Changeset 762 for pykota/trunk/bin
- Timestamp:
- 02/08/03 22:44:49 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r758 r762 17 17 # 18 18 # $Log$ 19 # Revision 1.12 2003/02/08 21:44:49 jalet 20 # Python 2.1 string module doesn't define ascii_letters 21 # 19 22 # Revision 1.11 2003/02/08 09:42:44 jalet 20 23 # Better handle wrong or bad command line arguments … … 136 139 def isValidPrinterName(self, printername) : 137 140 """Checks if a printername is valid.""" 138 import string 139 if printername[0] in string.ascii_letters : 140 validchars = string.ascii_letters + string.digits + "-_" 141 # unfortunately Python 2.1 string modules doesn't define ascii_letters... 142 asciiletters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' 143 digits = '0123456789' 144 if printername[0] in asciiletters : 145 validchars = asciiletters + digits + "-_" 141 146 for c in printername[1:] : 142 147 if c not in validchars :