Changeset 1612 for branches/alma/python/__init__.py
- Timestamp:
- 08/05/09 17:48:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/__init__.py
r1605 r1612 212 212 tup = line.split(':',1) 213 213 if len(tup) !=2: 214 print ('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname)) 214 #print ('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname)) 215 casalog.post('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname), 'WARN') 215 216 continue 216 217 … … 218 219 key = key.strip() 219 220 if not defaultParams.has_key(key): 220 print ('Bad key "%s" on line %d in %s' % (key, cnt, fname)) 221 #print ('Bad key "%s" on line %d in %s' % (key, cnt, fname)) 222 casalog.post('Bad key "%s" on line %d in %s' % (key, cnt, fname), 'WARN') 221 223 continue 222 224 … … 228 230 try: cval = converter(val) # try to convert to proper type or raise 229 231 except ValueError, msg: 230 print ('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, msg)) 232 #print ('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, msg)) 233 casalog.post('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, msg), 'WARN') 231 234 continue 232 235 else: … … 343 346 344 347 # Logging 348 from taskinit import * 345 349 from asap._asap import Log as _asaplog 346 350 global asaplog … … 353 357 def print_log(): 354 358 log = asaplog.pop() 355 if len(log) and rcParams['verbose']: print log 359 #if len(log) and rcParams['verbose']: print log 360 if len(log) and rcParams['verbose']: casalog.post( log ) 356 361 return 357 362 … … 389 394 del gui 390 395 except ImportError: 391 print "Matplotlib not installed. No plotting available" 396 #print "Matplotlib not installed. No plotting available" 397 casalog.post( "Matplotlib not installed. No plotting available", 'WARN' ) 392 398 393 399 __date__ = '$Date$'.split()[1]
Note: See TracChangeset
for help on using the changeset viewer.