Back to index

salome-smesh  6.5.0
Classes | Functions | Variables
spadderpy.configreader Namespace Reference

Classes

class  ConfigReader

Functions

def printConfig
def TEST_getDefaultConfig
def TEST_getDefaultConfig_withError
def testsuite

Variables

tuple CONFIG_RELPATH = os.path.join(PLUGIN_PATH_PATTERN,'smesh')
string CONFIG_FILENAME = "padder.cfg"
string TYPE_LOCAL = 'local'
string TYPE_REMOTE = 'remote'
list TYPES = [TYPE_LOCAL, TYPE_REMOTE]
string moduleName = "configreader"

Function Documentation

Definition at line 89 of file configreader.py.

00089 
00090 def printConfig(config):
00091     print "PADDER CONFIGURATION:"
00092     print "\tconfig.resname = %s"%config.resname
00093     print "\tconfig.binpath = %s"%config.binpath
00094     print "\tconfig.envpath = %s"%config.envpath
00095     
00096 
00097 #
00098 # =========================================================================
00099 # Test runner
00100 # =========================================================================
#

Definition at line 101 of file configreader.py.

00101 
00102 def TEST_getDefaultConfig():
00103     try:
00104         configReader = ConfigReader()
00105         defaultConfig = configReader.getDefaultConfig()
00106         print defaultConfig.resname
00107         print defaultConfig.binpath
00108         print defaultConfig.envpath
00109     except Exception, ex:
00110         sys.stderr.write('ERROR: %s\n' % str(ex))
00111         return False
00112     
00113     return True

Definition at line 114 of file configreader.py.

00114 
00115 def TEST_getDefaultConfig_withError():
00116     global CONFIG_FILENAME
00117     CONFIG_FILENAME = "toto.cfg"
00118     try:
00119         configReader = ConfigReader()
00120         defaultConfig = configReader.getDefaultConfig()
00121     except UiException, err:
00122         print 'ERROR: %s' % str(err)
00123         return True
00124     
00125     return False
00126 

Definition at line 130 of file configreader.py.

00130 
00131 def testsuite():
00132     unittester.run(moduleName, "TEST_getDefaultConfig")
00133     unittester.run(moduleName, "TEST_getDefaultConfig_withError")
    

Variable Documentation

Definition at line 30 of file configreader.py.

tuple spadderpy.configreader.CONFIG_RELPATH = os.path.join(PLUGIN_PATH_PATTERN,'smesh')

Definition at line 29 of file configreader.py.

string spadderpy.configreader.moduleName = "configreader"

Definition at line 128 of file configreader.py.

Definition at line 31 of file configreader.py.

Definition at line 32 of file configreader.py.

Definition at line 33 of file configreader.py.