Changeset 1615 for branches/alma


Ignore:
Timestamp:
08/06/09 16:05:48 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-729, CAS-1147

Ready to Release: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

I have modified a way to log messages in _row_callback() method such that
the message is directly written in the casalogger, not via a temporary file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/python/scantable.py

    r1614 r1615  
    453453
    454454        if rcParams['verbose']:
     455            import os
    455456            usr=os.environ['USER']
    456457            tmpfile='/tmp/tmp_'+usr+'_casapy_asap_scantable_stats'
     
    546547            out +=  "--------------------------------------------------\n"
    547548        if rcParams['verbose']:
    548             usr=os.environ['USER']
    549             tmpfile='/tmp/tmp_'+usr+'_casapy_asap_scantable_row_callback'
    550             f=open(tmpfile,'w')
    551             print >> f, "--------------------------------------------------"
    552             print >> f, " %s" % (label)
    553             print >> f, "--------------------------------------------------"
    554             print >> f, out
    555             f.close()
    556             f=open(tmpfile,'r')
    557             x=f.readlines()
    558             f.close()
    559             for xx in x:
    560                 asaplog.push( xx )
     549            asaplog.push("--------------------------------------------------")
     550            asaplog.push(" %s" % (label))
     551            asaplog.push("--------------------------------------------------")
     552            asaplog.push(out)
    561553            print_log()
    562554        # disabled because the vector seems more useful
Note: See TracChangeset for help on using the changeset viewer.