source: TI02-CSML/trunk/parser/API/parser_api.py @ 1009

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/parser/API/parser_api.py@1009
Revision 1009, 640 bytes checked in by domlowe, 13 years ago (diff)

API operations framework added

Line 
1''' parser_api.py  '''
2
3#import parser from parent directory
4import os, sys
5currentPath=os.getcwd()
6parserPath=os.sep.join(currentPath.split(os.sep)[:-1])
7sys.path.append(parserPath) #append the parser path to sys.path
8try:
9    from Parser import *
10except:
11    print 'Could not import CSML Parser. Make sure the Parser code is in parent directory.'
12    sys.exit()
13
14import ops_AbstractFeature
15import ops_PointFeature
16import ops_ProfileFeature
17
18#Assign operations to features
19AbstractFeature.testmethod=ops_AbstractFeature.testmethod
20PointFeature.testmethod=ops_PointFeature.testmethod
21ProfileFeature.testmethod=ops_ProfileFeature.testmethod
Note: See TracBrowser for help on using the repository browser.