Changeset 855


Ignore:
Timestamp:
28/04/06 11:22:03 (13 years ago)
Author:
domlowe
Message:

fixed problem with arraySize list/tuple/string confusion

Location:
TI02-CSML/trunk/Scanner/csmllibs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/Scanner/csmllibs/csmlbuilder.py

    r847 r855  
    129129        #parse and pretty print csml 
    130130        self.strCSML =csmllibs.parser_extra.PrettyPrint(csml) 
     131        #self.strCSML= parseString(tostring(csml)).toxml() 
     132         
    131133        #tidy up elementtree style namespaces 
    132134        self.strCSML=csmllibs.parser_extra.removeInlineNS(self.strCSML) 
  • TI02-CSML/trunk/Scanner/csmllibs/csmldataiface.py

    r837 r855  
    193193         
    194194        def getShapeOfVar(self): 
    195                 varshape=self.file.NX 
    196                 return varshape 
     195            #this should return a list. 
     196            varShape = [] 
     197            for item in self.file.NX: 
     198                varShape.append(item) 
     199            return varshape 
    197200         
    198201        def getLowLimits(self): 
     
    327330     
    328331    def getShapeOfVar(self): 
    329         varShape=self.varobj.shape 
     332        varShape = [] 
     333        for item in self.varobj.shape: 
     334            varShape.append(item) 
    330335        return varShape 
    331336     
  • TI02-CSML/trunk/Scanner/csmllibs/csmlextra.py

    r45 r855  
    3232         
    3333# a couple of string cleaning functions: 
    34 def cleanString1(messystring): 
    35         #removes outer brackets and changes commas to spaces 
    36         cleanstring = messystring[1:-1] 
    37         cleanstring = cleanstring.replace(',',' ') 
    38         #strip off first (time) dimension. 
    39         #note, this might need rethinking for other datasets 
    40         cleanstring = cleanstring[3:] 
    41         return cleanstring 
     34#   don't think these are used now 
     35# def cleanString1(messystring): 
     36#       #removes outer brackets and changes commas to spaces 
     37#       cleanstring = messystring[1:-1] 
     38#       cleanstring = cleanstring.replace(',',' ') 
     39#       #strip off first (time) dimension. 
     40#       #note, this might need rethinking for other datasets 
     41#       cleanstring = cleanstring[3:] 
     42#       return cleanstring 
     43#        
     44# def cleanString2(messystring): 
     45#       #removes outer brackets and 's, but leaves commas. 
     46#       cleanstring = messystring[1:-1] 
     47#       cleanstring = cleanstring.replace("'",'') 
     48#       return cleanstring 
    4249         
    43 def cleanString2(messystring): 
    44         #removes outer brackets and 's, but leaves commas. 
    45         cleanstring = messystring[1:-1] 
    46         cleanstring = cleanstring.replace("'",'') 
    47         return cleanstring 
    48          
  • TI02-CSML/trunk/Scanner/csmllibs/csmlfeaturetypes.py

    r837 r855  
    119119                rs=csmllibs.Parser.RangeSet() 
    120120                aa=csmllibs.Parser.AggregatedArray() 
    121                 aa.arraySize=str(arrSz) 
     121                aa.arraySize=[] 
     122                aa.arraySize.append(arrSz) 
    122123                aa.uom=strUom 
    123124                aa.aggType='new' #can it be anything else? 
     
    134135                     
    135136                varSize=DI.getShapeOfVar() 
    136                 fe.arraySize=csmllibs.csmlextra.cleanString1(str(varSize)) 
     137                fe.arraySize=varSize 
    137138                fe.fileName=filesinDir 
    138139                fe.variableName=allVarNames[i] 
  • TI02-CSML/trunk/Scanner/csmllibs/csmlfileextracts.py

    r847 r855  
    5555                #SET variableName attribute of file extract 
    5656                arrayDescriptor.variableName=str(allDimNames[j]) 
    57      
     57                 
     58                 
    5859                #SET arraySize attribute of file extract 
    5960                dimValue =DI.getSizeOfAxis(allDimNames[j]) 
Note: See TracChangeset for help on using the changeset viewer.