当前位置: 首页>>代码示例>>Python>>正文


Python EDConfiguration.getStringParamValue方法代码示例

本文整理汇总了Python中EDConfiguration.EDConfiguration.getStringParamValue方法的典型用法代码示例。如果您正苦于以下问题:Python EDConfiguration.getStringParamValue方法的具体用法?Python EDConfiguration.getStringParamValue怎么用?Python EDConfiguration.getStringParamValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EDConfiguration.EDConfiguration的用法示例。


在下文中一共展示了EDConfiguration.getStringParamValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        """
        Gets the dbserver parameters from the config file and stores them in class member attributes.
        """
        EDPluginExec.configure(self)
        pluginConfiguration = self.getConfiguration()

        if(pluginConfiguration == None):
            EDVerbose.DEBUG("*** EDPluginISPyBv1_2.configure: pluginConfiguration is None, using default settings")
        else:
            EDVerbose.DEBUG("*** EDPluginISPyBv1_2.configure: pluginConfiguration found, using settings from there")
            strDbserverHost = EDConfiguration.getStringParamValue(pluginConfiguration, "dbserverHost")
            if(strDbserverHost == None):
                strErrorMessage = EDMessage.ERROR_EXECUTION_03 % ("EDPluginISPyBv1_2.configure", self.getClassName(), \
                                                                     "Configuration parameter missing: dbserverHost")
                EDVerbose.error(strErrorMessage)
                self.addErrorMessage(strErrorMessage)
                raise RuntimeError, strErrorMessage
            else:
                self.setDbserverHost(strDbserverHost)

            strDbserverPort = EDConfiguration.getStringParamValue(pluginConfiguration, "dbserverPort")
            if(strDbserverPort == None):
                strErrorMessage = EDMessage.ERROR_EXECUTION_03 % ("EDPluginISPyBv1_2.configure", self.getClassName(), \
                                                                     "Configuration parameter missing: dbserverPort")
                EDVerbose.error(strErrorMessage)
                self.addErrorMessage(strErrorMessage)
                raise RuntimeError, strErrorMessage
            else:
                self.setDbserverPort(int (strDbserverPort))
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:32,代码来源:EDPluginISPyBv1_2.py

示例2: preProcess

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def preProcess(self):
     EDTestCasePluginExecuteDistlSignalStrengthThinClientv1_1.preProcess(self)
     # Load the configuration file
     xsPluginItem = self.getPluginConfiguration()
     if xsPluginItem is not None:
         strServerPort = EDConfiguration.getStringParamValue(xsPluginItem, \
             EDPluginDistlSignalStrengthThinClientv1_1.CONF_DISTL_SIGNAL_STRENGTH_SERVER_PORT)
         if strServerPort is None:
             iServerPort = EDPluginDistlSignalStrengthThinClientv1_1.DEFAULT_SERVER_PORT
         else:
             iServerPort = int(strServerPort)
         strPathToServer = EDConfiguration.getStringParamValue(xsPluginItem, \
             EDPluginDistlSignalStrengthThinClientv1_1.CONF_PATH_TO_DISTL_SIGNAL_STRENGTH_SERVER)
         if(strPathToServer == None):
             strErrorMessage = "EDPluginLabelitv1_1.configure : Configuration parameter missing: " + \
                                 "distl.mp_spotfinder_server_read_file"
             self.error(strErrorMessage)
             self.addErrorMessage(strErrorMessage)
             self.setFailure()
         # Start the server using random port
         self.subprocess = EDUtilsPlatform.Popen(shlex.split(str(EDUtilsPlatform.escape(strPathToServer + " distl.port=%d" % iServerPort))),
                                                    cwd=os.getcwd())
         self.iPID = self.subprocess.pid
         # Give the server some time to start up
         time.sleep(8)
开发者ID:antolinos,项目名称:edna,代码行数:27,代码来源:EDTestCasePluginExecuteDistlSignalStrengthThinClientLocalServerv1_1.py

示例3: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        """
        Gets the configuration parameters (if any).
        """
        EDPluginControl.configure(self)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv1_1.configure")
        pluginConfiguration = self.getConfiguration()

        if(pluginConfiguration is None):
            EDVerbose.DEBUG("No plugin configuration found for EDPluginControlCharacterisationv1_1.")
        else:
            if (self.getControlledPluginName("indexingPlugin") is not None):
                self.__strPluginIndexingName = self.getControlledPluginName("indexingPlugin")
            if (self.getControlledPluginName("integrationPlugin") is not None):
                self.__strPluginIntegrationName = self.getControlledPluginName("integrationPlugin")
            if (self.getControlledPluginName("strategyPlugin") is not None):
                self.__strPluginStrategyName = self.getControlledPluginName("strategyPlugin")
            if (self.getControlledPluginName("kappaStrategyPlugin") is not None):
                self.__strPluginKappaStrategyName = self.getControlledPluginName("kappaStrategyPlugin")
            if (self.getControlledPluginName("integrationPointlessPlugin") is not None):
                self.__strPluginIntegrationPoitlessName = self.getControlledPluginName("integrationPointlessPlugin")

            pyStrKappa = EDConfiguration.getStringParamValue(pluginConfiguration, "KAPPA")
            if(pyStrKappa == "ON"):
                self.__strPluginStrategyName = self.__strPluginKappaStrategyName

            pyStrPointless = EDConfiguration.getStringParamValue(pluginConfiguration, "POINTLESS")
            if(pyStrPointless == "ON"):
                self.__strPluginIntegrationName = self.__strPluginIntegrationPointlessName
开发者ID:antolinos,项目名称:edna,代码行数:31,代码来源:EDPluginControlCharacterisationv1_1.py

示例4: preProcess

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     EDVerbose.DEBUG("EDPluginSTACv10.preProcess")
     xsPluginItem = self.getConfiguration()
     self.addListCommandPreExecution("export STACDIR=%s" % EDConfiguration.getStringParamValue(xsPluginItem, "STACDIR"))
     self.addListCommandPreExecution("export BCMDEF=%s" % EDConfiguration.getStringParamValue(xsPluginItem, "BCMDEF"))
     self.addListCommandPreExecution("export RUNDIR=%s" % self.getWorkingDirectory())
     self.setScriptCommandline("stac.core.STAC_DNA_listener %s -%s/" % (self.getSTACcommand(), self.getWorkingDirectory()))
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:10,代码来源:EDPluginSTACv10.py

示例5: testGetParamValue

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def testGetParamValue(self):
     """
     Testing the XSParamItem Value convertion from string to different formats
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
     EDAssert.equal("/path/to/working/dir", edConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal("/path/to/working/dir", EDConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal(3, edConfiguration.getIntegerParamValue(xsPluginItem, "number"))
     EDAssert.equal(3, EDConfiguration.getIntegerParamValue(xsPluginItem, "number"))
开发者ID:antolinos,项目名称:edna,代码行数:14,代码来源:EDTestCaseEDConfiguration.py

示例6: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def configure(self):
     EDPluginControl.configure(self)
     EDVerbose.DEBUG("EDPluginControlInterfaceToMXCuBEv1_2.configure")
     xsPluginItem = self.getConfiguration()
     if xsPluginItem == None:
         EDVerbose.DEBUG("EDPluginControlInterfaceToMXCuBEv1_2.configure: No plugin item defined.")
     else:
         self.__strEDNAContactEmail = EDConfiguration.getStringParamValue(xsPluginItem, EDPluginControlInterfaceToMXCuBEv1_2.__EDNA_CONTACT_EMAIL)
         EDVerbose.DEBUG("EDPluginControlInterfaceToMXCuBEv1_2.configure: EDNAContactEmail = %s" % self.__strEDNAContactEmail)
         strEDNAEmailSender = EDConfiguration.getStringParamValue(xsPluginItem, self.__EDNA_EMAIL_SENDER)
         if strEDNAEmailSender:
             self.__strEDNAEmailSender = strEDNAEmailSender
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:14,代码来源:EDPluginControlInterfaceToMXCuBEv1_2.py

示例7: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def configure(self):
     """
     setup two configurations:
     --> MAX_OFFSET_VALUE 
     --> FILL_VALUE 
     
     """
     EDPluginExec.configure(self)
     if not self.__class__.CONFIGURED:
         with self.__class__._clsLock:
             if not self.__class__.CONFIGURED:
                 self.DEBUG("EDPluginExecShiftImagev1_1.configure")
                 xsPluginItem = self.getConfiguration()
                 if xsPluginItem == None:
                     self.WARNING("EDPluginExecShiftImagev1_1.configure: No plugin item defined.")
                     xsPluginItem = XSPluginItem()
                 strFill = EDConfiguration.getStringParamValue(xsPluginItem, self.__class__.FILL_KEY)
                 if strFill == None:
                     self.WARNING(
                         "EDPluginExecShiftImagev1_1.configure: No configuration parameter found for: %s using default value: %s\n%s"
                         % (self.FILL_KEY, self.FILL_VALUE, xsPluginItem.marshal())
                     )
                 else:
                     strFill = strFill.strip().lower()
                     if strFill in ["min", "max", "mean"]:
                         self.__class__.FILL_VALUE = strFill
                     else:
                         try:
                             self.__class__.FILL_VALUE = float(strFill)
                         except ValueError, error:
                             self.ERROR("unable to convert %s to float: %s" % (strFill, error))
                 strMaxOffset = EDConfiguration.getStringParamValue(xsPluginItem, self.__class__.MAX_OFFSET_KEY)
                 if strMaxOffset == None:
                     self.WARNING(
                         "EDPluginExecShiftImagev1_1.configure: No configuration parameter found for: %s using default value: %s\n%s"
                         % (self.MAX_OFFSET_KEY, self.MAX_OFFSET_VALUE, xsPluginItem.marshal())
                     )
                 else:
                     if strMaxOffset.isdigit():
                         try:
                             self.__class__.MAX_OFFSET_VALUE = int(strMaxOffset)
                         except ValueError, error:
                             self.ERROR("unable to convert %s to int: %s" % (strMaxOffset, error))
                     else:
                         self.WARNING(
                             "EDPluginExecShiftImagev1_1.configure: No configuration parameter found for: %s using default value: %s\n%s"
                             % (self.MAX_OFFSET_KEY, self.MAX_OFFSET_VALUE, xsPluginItem.marshal())
                         )
开发者ID:gbourgh,项目名称:edna,代码行数:50,代码来源:EDPluginExecShiftImagev1_1.py

示例8: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        """
        Gets the configuration parameters (if any). Use the Python name mangling rules for storing the parameters in 
        the private variables of the parent class.
        """
        EDPluginControl.configure(self)
        EDVerbose.DEBUG("EDPluginControlCharForReorientInterfacev2_0.configure")
        pluginConfiguration = self.getConfiguration()
        strUseISPyBPlugin = "false"

        if pluginConfiguration is None:
            EDVerbose.DEBUG("No plugin configuration found for EDPluginControlCharForReorientInterfacev2_0.")
        else:
            if self.getControlledPluginName("subWedgeAssemblePlugin") is not None:
                self._EDPluginControlInterfacev2_0__strEDPluginControlSubWedgeAssembleName = self.getControlledPluginName(
                    "subWedgeAssemblePlugin"
                )
            if self.getControlledPluginName("characterisationPlugin") is not None:
                self._EDPluginControlInterfacev2_0__strEDPluginControlCharacterisationName = self.getControlledPluginName(
                    "characterisationPlugin"
                )
            if self.getControlledPluginName("ispybPlugin") is not None:
                self._EDPluginControlInterfacev2_0__strEDPluginControlISPyBName = self.getControlledPluginName(
                    "ispybPlugin"
                )
            strUseISPyBPlugin = EDConfiguration.getStringParamValue(pluginConfiguration, "useISPyBPlugin")

        if strUseISPyBPlugin.lower() != "true":
            self._EDPluginControlInterfacev2_0__strEDPluginControlISPyBName = None
开发者ID:gbourgh,项目名称:edna,代码行数:31,代码来源:EDPluginControlCharForReorientInterfacev2_0.py

示例9: checkAbsTable

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def checkAbsTable(self):
     _pluginConfiguration = self.getConfiguration()
     _strAbsTable = EDConfiguration.getStringParamValue(_pluginConfiguration, 'absTable')
     if os.path.isfile(_strAbsTable):
         shutil.copy(_strAbsTable, self.getWorkingDirectory())
     else:
         EDVerbose.ERROR("EDPluginExecAbsCalcv0_1.checkAbsTable Couldn't find abstable file")
         self.setFailure()
开发者ID:antolinos,项目名称:edna,代码行数:10,代码来源:EDPluginExecAbsCalcv0_1.py

示例10: testGetParamValue

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
 def testGetParamValue(self):
     """
     Testing the XSParamItem Value convertion from string to different formats
     """
     xsPluginItem = self.___edConfiguration.getPluginItem("indexingMosflm")
     EDAssert.equal("/path/to/working/dir", self.___edConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal("/path/to/working/dir", EDConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal(3, self.___edConfiguration.getIntegerParamValue(xsPluginItem, "number"))
     EDAssert.equal(3, EDConfiguration.getIntegerParamValue(xsPluginItem, "number"))
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:11,代码来源:EDTestCaseEDConfiguration.py

示例11: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        EDPluginExec.configure(self)
        EDVerbose.DEBUG("EDPluginExecOutputHTMLv1_0.configure")
        pluginConfiguration = self.getConfiguration()

        if pluginConfiguration != None:
            self.__strEDNA2html = EDConfiguration.getStringParamValue(pluginConfiguration, \
                                                               EDPluginExecOutputHTMLv1_0.CONF_EDNA2html)
        elif os.environ.has_key("EDNA2html"):
            self.__strEDNA2html = os.environ["EDNA2html"]
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:12,代码来源:EDPluginExecOutputHTMLv1_0.py

示例12: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        EDPluginControl.configure(self)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv01.configure")
        pluginConfiguration = self.getConfiguration()

        if(pluginConfiguration == None):
            strWarningMessage = EDMessage.WARNING_NO_PLUGIN_CONFIGURATION_ITEM_FOUND_02 % ('EDPluginControlCharacterisationv01.configure', self.getPluginName())
            EDVerbose.DEBUG(strWarningMessage)
        else:
            strSymopHome = EDConfiguration.getStringParamValue(pluginConfiguration, "KAPPA")
            if(strSymopHome == None or strSymopHome != "ON"):
                self.__strPluginStrategyName = "EDPluginControlStrategyv10"
            else:
                self.__strPluginStrategyName = "EDPluginControlKappaStrategyv10"

            strSymopHome = EDConfiguration.getStringParamValue(pluginConfiguration, "POINTLESS")
            if(strSymopHome == None or strSymopHome != "ON"):
                self.__strPluginIntegrationName = "EDPluginControlIntegrationv10"
            else:
                self.__strPluginIntegrationName = "EDPluginControlIntegrationPointlessv10"
开发者ID:antolinos,项目名称:edna,代码行数:22,代码来源:EDPluginControlCharacterisationv10.py

示例13: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        EDPluginControl.configure(self)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv2_0.configure")
        pluginConfiguration = self.getConfiguration()

        if(pluginConfiguration != None):
            strPointlessOn = EDConfiguration.getStringParamValue(pluginConfiguration, "POINTLESS")
            if(strPointlessOn == None or strPointlessOn != "True"):
                self.strPluginIntegrationName = "EDPluginControlIntegrationv10"
            else:
                self.strPluginIntegrationName = "EDPluginControlIntegrationPointlessv10"
开发者ID:edna-site,项目名称:edna,代码行数:13,代码来源:EDPluginControlCharacterisationv2_0.py

示例14: configure

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def configure(self):
        EDPluginControl.configure(self)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv2_0.configure")
        pluginConfiguration = self.getConfiguration()

        self.strPluginStrategyName = "EDPluginControlKappaStrategyv2_0"
        if(pluginConfiguration != None):
            strKappaOn = EDConfiguration.getStringParamValue(pluginConfiguration, "KAPPA")
#            if(strKappaOn == None or strKappaOn != "ON"):
#                #self.strPluginStrategyName = "EDPluginControlStrategyv10"
#                #self.strPluginStrategyName = "EDPluginControlStrategyv2_0"
#                self.strPluginStrategyName = "EDPluginControlKappaStrategyv2_0"
#            else:
#                self.strPluginStrategyName = "EDPluginControlKappaStrategyv2_0"

            strPointlessOn = EDConfiguration.getStringParamValue(pluginConfiguration, "POINTLESS")
            if(strPointlessOn == None or strPointlessOn != "True"):
                self.strPluginIntegrationName = "EDPluginControlIntegrationv10"
            else:
                self.strPluginIntegrationName = "EDPluginControlIntegrationPointlessv10"
开发者ID:tbn,项目名称:edna,代码行数:22,代码来源:EDPluginControlCharacterisationv2_0.py

示例15: preProcess

# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import getStringParamValue [as 别名]
    def preProcess(self, _edObject=None):
        EDPluginExecProcessScript.preProcess(self)
        EDVerbose.DEBUG("*** EDPluginFIT2DCakev1_0.preProcess")
        # Check that the input data and correction images are present
        xsDataInputFIT2DCake = self.getDataInput()
        pyStrPathToInputFile = xsDataInputFIT2DCake.getInputFile().getPath().getValue()
        if (not os.path.exists(pyStrPathToInputFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pyStrPathToInputFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pyStrPathToDarkCurrentImageFile = xsDataInputFIT2DCake.getDarkCurrentImageFile().getPath().getValue()
        if (not os.path.exists(pyStrPathToDarkCurrentImageFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pyStrPathToDarkCurrentImageFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pyStrPathToFlatFieldImageFile = xsDataInputFIT2DCake.getFlatFieldImageFile().getPath().getValue()
        if (not os.path.exists(pyStrPathToFlatFieldImageFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pyStrPathToFlatFieldImageFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pyStrPathToSpatialDistortionFile = xsDataInputFIT2DCake.getSpatialDistortionFile().getPath().getValue()
        if (not os.path.exists(pyStrPathToSpatialDistortionFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pyStrPathToSpatialDistortionFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        # Get path to Xvfb program
        pluginConfiguration = self.getConfiguration()
        if(pluginConfiguration is not None):
            self.m_strPathToXvfb = EDConfiguration.getStringParamValue(pluginConfiguration, self.m_strCONF_PATH_TO_XVFB)
            self.m_strArgumentsForXvfb = EDConfiguration.getStringParamValue(pluginConfiguration, self.m_strCONF_ARGUMENTS_FOR_XVFB)
        if (self.m_strPathToXvfb is None):
            strErrorMessage = EDMessage.ERROR_NO_PLUGIN_CONFIGURATION_ITEM_FOUND_02 % (self.getPluginName() + ".preProcess", self.m_strCONF_PATH_TO_XVFB)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage

        self.generateFIT2DCommands()
开发者ID:antolinos,项目名称:edna,代码行数:43,代码来源:EDPluginFIT2DCakev1_0.py


注:本文中的EDConfiguration.EDConfiguration.getStringParamValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。