Changeset 2751 for trunk/python


Ignore:
Timestamp:
01/30/13 13:42:55 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: 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...

Update is_scantable.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2713 r2751  
    22
    33import os
     4import re
    45import tempfile
    56import numpy
     
    4546        l=f.readline()
    4647        f.close()
    47         if ( l.find('Scantable') != -1 ):
     48        match_pattern = '^Type = Scantable *$'
     49        unmatch_pattern = '^Type = (MeasurementSet|Image|ApplyTable) *$'
     50        #if ( l.find('Scantable') != -1 ):
     51        if re.match(match_pattern,l):
    4852            return True
    49         elif ( l.find('Measurement Set') == -1 and
    50                l.find('Image') == -1 ):
     53        #elif ( l.find('Measurement Set') == -1 and
     54        #       l.find('Image') == -1):
     55        elif re.match(unmatch_pattern,l) is None:
    5156            return True
    5257        else:
Note: See TracChangeset for help on using the changeset viewer.