Changeset 1695
- Timestamp:
- 09/02/04 15:26:29 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1694 r1695 24 24 - 1.20alpha6 : 25 25 26 - Small fix for old versions of LPRng. 27 26 28 - Now exports PYKOTAPRINTERHOSTNAME for network printers' 27 29 hostname or IP address. Set to 'localhost' when not -
pykota/trunk/pykota/tool.py
r1694 r1695 22 22 # 23 23 # $Log$ 24 # Revision 1.120 2004/09/02 13:26:29 jalet 25 # Small fix for old versions of LPRng 26 # 24 27 # Revision 1.119 2004/09/02 13:09:58 jalet 25 28 # Now exports PYKOTAPRINTERHOSTNAME … … 1141 1144 self.printInfo(_("Printer hostname undefined, set to 'localhost'"), "warn") 1142 1145 rseen = "localhost" 1146 1147 spooldir = os.environ.get("SPOOL_DIR", ".") 1143 1148 try : 1144 1149 df_name = [line[8:] for line in os.environ.get("HF", "").split() if line.startswith("df_name=")][0] … … 1147 1152 cftransfername = [line[15:] for line in os.environ.get("HF", "").split() if line.startswith("cftransfername=")][0] 1148 1153 except IndexError : 1149 inputfile = None 1154 try : 1155 df_name = [line[1:] for line in os.environ.get("CONTROL", "").split() if line.startswith("fdf") or line.startswith("Udf")][0] 1156 except IndexError : 1157 inputfile = None 1158 else : 1159 inputfile = os.path.join(spooldir, df_name) 1150 1160 else : 1151 inputfile = os.path.join( os.environ.get("SPOOL_DIR", "."), "d" + cftransfername[1:])1161 inputfile = os.path.join(spooldir, "d" + cftransfername[1:]) 1152 1162 else : 1153 inputfile = os.path.join(os.environ.get("SPOOL_DIR", "."), df_name) 1163 inputfile = os.path.join(spooldir, df_name) 1164 1154 1165 if jseen and Pseen and nseen and rseen : 1155 options = os.environ.get("HF", "") 1166 options = os.environ.get("HF", "") or os.environ.get("CONTROL", "") 1156 1167 return ("LPRNG", rseen, Pseen, nseen, jseen, inputfile, Kseen, Jseen, options, None) 1157 1168 self.printInfo(_("Printing system unknown, args=%s") % " ".join(sys.argv), "warn")