Changeset 1555
- Timestamp:
- 05/10/06 16:23:02 (14 years ago)
- Location:
- TI02-CSML/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/Examples/parsing/apicalls.py
r1523 r1555 22 22 feature=csmldoc.getFeature(flist[4]) 23 23 24 #feature 'bestname'24 f#eature 'bestname' 25 25 print feature.id 26 26 print feature.description -
TI02-CSML/trunk/Examples/scanning/mstconfig.cfg
r1493 r1555 4 4 5 5 [files] 6 root: /home/users/domlowe/SVNWorkingCopy/trunk/ Scanner/msttest6 root: /home/users/domlowe/SVNWorkingCopy/trunk/Examples/scanning/msttest 7 7 mapping: oneonly 8 8 output:mstout.xml -
TI02-CSML/trunk/csml/API/csmlContainer.py
r1523 r1555 53 53 #need to think about whether it is best to append the file object or just a path to the file 54 54 self.ncfiles.append(ncfile) 55 55 56 56 57 def getContents(self): 57 58 self.ds.arrayDescriptors=self.ad -
TI02-CSML/trunk/csml/csmllibs/csmldataiface.py
r1466 r1555 43 43 return cdunifInterface() 44 44 elif fileExtension == 'ctl': 45 return cdunifInterface() 46 elif fileExtension == 'xml': 45 47 return cdunifInterface() 46 48 else: … … 313 315 self.extractType = 'GRIBExtract' 314 316 self.extractPrefix = '_gribextract_' 315 317 elif fileExtension == 'xml': 318 self.extractType = 'NetCDFExtract' #okay this isn't true, but ok for testing 319 self.extractPrefix = '_ncextract__' 316 320 def getListOfAxes(self): 317 321 axes=self.file.dimensions.keys() -
TI02-CSML/trunk/csml/csmllibs/csmldirectory.py
r1462 r1555 3 3 import nappy 4 4 import sys 5 import string 5 6 6 7 class DirectoryTree(object): … … 99 100 fileExtension = str(filename)[-3:] 100 101 supported = False 102 101 103 try: 102 104 if fileExtension == '.nc': … … 106 108 elif fileExtension == 'ctl': 107 109 supported = True 110 elif fileExtension == 'xml': 111 #this could be a CDML file. Only way to see is to open it. 112 f=open(filename, 'r') 113 f.readline() #read first line, now read docstring on second line 114 line2=f.readline() 115 if string.find(line2,'http://www-pcmdi.llnl.gov/software/cdms/cdml.dtd') > -1: 116 supported = True 117 f.close() 108 118 elif nappy.readFFI(filename) in [1001,1010,1020,2010,2110,2160,2310,3010,4010]: 109 119 supported = True … … 111 121 #the nappy.readFFI function can fail if permissions are wrong (for example) 112 122 supported=False 113 123 return supported 114 124 115 125
Note: See TracChangeset
for help on using the changeset viewer.