Changeset 833
- Timestamp:
- 03/07/08 14:46:43 (9 months ago)
- Files:
-
- trunk/lib/cl2py.py (modified) (1 diff)
- trunk/lib/irafpar.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/cl2py.py
r789 r833 105 105 #raise TypeError('string must be a string') 106 106 clInput = string 107 efilename = 'string_proc' 107 efilename = 'string_proc' # revisit this setting (tik #24), maybe '' ? 108 108 if usecache: 109 109 index, pycode = codeCache.get(None,mode=mode,source=clInput) trunk/lib/irafpar.py
r803 r833 45 45 _real_types = [ 'r', 'd' ] 46 46 47 def IrafParFactory(fields, filename=None,strict=0):47 def IrafParFactory(fields, strict=0): 48 48 49 49 """IRAF parameter factory … … 59 59 type = fields[1] 60 60 if type in _string_types: 61 return IrafParS(fields, filename,strict)61 return IrafParS(fields,strict) 62 62 elif type in _string_list_types: 63 return IrafParLS(fields, filename,strict)63 return IrafParLS(fields,strict) 64 64 elif type == "*gcur" or type == "gcur": 65 return IrafParGCur(fields, filename,strict)65 return IrafParGCur(fields,strict) 66 66 elif type == "*imcur" or type == "imcur": 67 return IrafParImCur(fields, filename,strict)67 return IrafParImCur(fields,strict) 68 68 elif type == "*ukey" or type == "ukey": 69 return IrafParUKey(fields, filename,strict)69 return IrafParUKey(fields,strict) 70 70 elif type == "pset": 71 return IrafParPset(fields, filename,strict)71 return IrafParPset(fields,strict) 72 72 elif type in _real_types: 73 return IrafParR(fields, filename,strict)73 return IrafParR(fields,strict) 74 74 elif type == "i": 75 return IrafParI(fields, filename,strict)75 return IrafParI(fields,strict) 76 76 elif type == "b": 77 return IrafParB(fields, filename,strict)77 return IrafParB(fields,strict) 78 78 elif type == "ar": 79 return IrafParAR(fields, filename,strict)79 return IrafParAR(fields,strict) 80 80 elif type == "ai": 81 return IrafParAI(fields, filename,strict)81 return IrafParAI(fields,strict) 82 82 elif type == "as": 83 return IrafParAS(fields, filename,strict)83 return IrafParAS(fields,strict) 84 84 elif type == "ab": 85 return IrafParAB(fields, filename,strict)85 return IrafParAB(fields,strict) 86 86 elif type[:1] == "a": 87 87 raise SyntaxError("Cannot handle arrays of type %s" % type) … … 114 114 115 115 """Create an IrafPar variable""" 116 117 # Deprecation note 118 if filename!=None and len(filename)>0 and filename!='string_proc': 119 warning("Use of filename arg in makeIrafPar is rather deprecated\n"+\ 120 ", filename = \'"+filename+"'", level=-1) 116 121 117 122 # if init_value is already an IrafPar, just return it … … 183 188 fields[i] = str(fields[i]) 184 189 try: 185 return IrafParFactory(fields, filename,strict=strict)190 return IrafParFactory(fields, strict=strict) 186 191 except ValueError, e: 187 192 errmsg = "Bad value for parameter `%s'\n%s" % (name, str(e)) … … 245 250 """Non-array IRAF parameter base class""" 246 251 247 def __init__(self,fields, filename,strict=0):252 def __init__(self,fields,strict=0): 248 253 orig_len = len(fields) 249 254 if orig_len < 3 or None in fields[0:3]: … … 848 853 """IRAF array parameter class""" 849 854 850 def __init__(self,fields, filename,strict=0):855 def __init__(self,fields,strict=0): 851 856 orig_len = len(fields) 852 857 if orig_len < 3: … … 1280 1285 """IRAF pset parameter class""" 1281 1286 1282 def __init__(self,fields, filename,strict=0):1283 IrafParS.__init__(self,fields, filename,strict)1287 def __init__(self,fields,strict=0): 1288 IrafParS.__init__(self,fields,strict) 1284 1289 # omitted pset parameters default to null string 1285 1290 if self.value is None: self.value = "" … … 1315 1320 """IRAF list parameter base class""" 1316 1321 1317 def __init__(self,fields, filename,strict=0):1318 IrafPar.__init__(self,fields, filename,strict)1322 def __init__(self,fields,strict=0): 1323 IrafPar.__init__(self,fields,strict) 1319 1324 # filehandle for input file 1320 1325 self.__dict__['fh'] = None … … 2509 2514 i1 = mm.end() 2510 2515 try: 2511 par = IrafParFactory(flist, filename,strict=strict)2516 par = IrafParFactory(flist, strict=strict) 2512 2517 except KeyboardInterrupt: 2513 2518 raise
