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


Python ServerProxy.getCustomKWResult方法代码示例

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


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

示例1: ErtRPCClient

# 需要导入模块: from xmlrpclib import ServerProxy [as 别名]
# 或者: from xmlrpclib.ServerProxy import getCustomKWResult [as 别名]

#.........这里部分代码省略.........
        """
        Check if the realization successfully finished running.
        @type sim_id: int
        @rtype: bool
        """
        return self._server_proxy.didRealizationSucceed(sim_id)

    def didRealizationFail(self, sim_id):
        """
        Check if the realization failed while running.
        @type sim_id: int
        @rtype: bool
        """
        return self._server_proxy.didRealizationFail(sim_id)

    def getGenDataResult(self, target_case_name, sim_id, report_step, keyword):
        """
        Retrieve a GenData result from a target case
        @type target_case_name: str
        @type sim_id: int
        @type report_step: int
        @type keyword: str
        @rtype: list[float]
        @raise KeyError if the server was unable to recognize the keyword
        @raise UserWarning if the server was unable to load the data
        @raise UserWarning if the simulation (with sim_id) is still running
        @raise UserWarning if the keyword is not of the correct type
        """
        try:
            return self._server_proxy.getGenDataResult(target_case_name, sim_id, report_step, keyword)
        except Fault as f:
            raise convertFault(f)

    def getCustomKWResult(self, target_case_name, sim_id, keyword):
        """
        Retrieve a CustomKW result from the target case.
        @type target_case_name: str
        @type sim_id: int
        @type keyword: str
        @rtype: dict[str, Union[float,str]]
        @raise KeyError if the server was unable to recognize the keyword
        @raise UserWarning if the server was unable to load the data
        @raise UserWarning if the simulation (with sim_id) is still running
        @raise UserWarning if the keyword is not of the correct type
        """
        try:
            return self._server_proxy.getCustomKWResult(target_case_name, sim_id, keyword)
        except Fault as f:
            raise convertFault(f)

    def isCustomKWKey(self, key):
        """
        Check if a key is of CustomKW type
        @param key: The key to check
        @type key: str
        @rtype: bool
        """
        return self._server_proxy.isCustomKWKey(key)

    def isGenDataKey(self, key):
        """
        Check if a key is of CustomKW type
        @param key: The key to check
        @type key: str
        @rtype: bool
        """
开发者ID:agchitu,项目名称:ert,代码行数:70,代码来源:ertrpcclient.py

示例2: ErtRPCClient

# 需要导入模块: from xmlrpclib import ServerProxy [as 别名]
# 或者: from xmlrpclib.ServerProxy import getCustomKWResult [as 别名]

#.........这里部分代码省略.........
        """
        try:
            self._server_proxy.startSimulationBatch(initialization_case_name, simulation_count)
        except Fault as f:
            raise convertFault(f)


    def addSimulation(self, target_case_name, geo_id, pert_id, sim_id, keywords):
        """
        Start a simulation.
        @type target_case_name: str
        @type geo_id: int
        @type pert_id:
        @type sim_id: int
        @type keywords: dict[str, list]
        @raise UserWarning if the server is not ready to receive simulations
        @raise UserWarning if the server is already running a simulation with the same id as sim_id
        """
        try:
            self._server_proxy.addSimulation(target_case_name, geo_id, pert_id, sim_id, keywords)
        except Fault as f:
            raise convertFault(f)


    def isRealizationFinished(self, sim_id):
        """
        Returns true if the realization is finished running.
        @type sim_id: int
        @rtype: bool
        """
        return self._server_proxy.isRealizationFinished(sim_id)

    def didRealizationSucceed(self, sim_id):
        """
        Check if the realization successfully finished running.
        @type sim_id: int
        @rtype: bool
        """
        return self._server_proxy.didRealizationSucceed(sim_id)

    def didRealizationFail(self, sim_id):
        """
        Check if the realization failed while running.
        @type sim_id: int
        @rtype: bool
        """
        return self._server_proxy.didRealizationFail(sim_id)

    def getGenDataResult(self, target_case_name, sim_id, report_step, keyword):
        """
        Retrieve a GenData result from a target case
        @type target_case_name: str
        @type sim_id: int
        @type report_step: int
        @type keyword: str
        @rtype: list[float]
        @raise KeyError if the server was unable to recognize the keyword
        @raise UserWarning if the server was unable to load the data
        @raise UserWarning if the simulation (with sim_id) is still running
        @raise UserWarning if the keyword is not of the correct type
        """
        try:
            return self._server_proxy.getGenDataResult(target_case_name, sim_id, report_step, keyword)
        except Fault as f:
            raise convertFault(f)

    def getCustomKWResult(self, target_case_name, sim_id, keyword):
        """
        Retrieve a CustomKW result from the target case.
        @type target_case_name: str
        @type sim_id: int
        @type keyword: str
        @rtype: dict[str, Union[float,str]]
        @raise KeyError if the server was unable to recognize the keyword
        @raise UserWarning if the server was unable to load the data
        @raise UserWarning if the simulation (with sim_id) is still running
        @raise UserWarning if the keyword is not of the correct type
        """
        try:
            return self._server_proxy.getCustomKWResult(target_case_name, sim_id, keyword)
        except Fault as f:
            raise convertFault(f)

    def isCustomKWKey(self, key):
        """
        Check if a key is of CustomKW type
        @param key: The key to check
        @type key: str
        @rtype: bool
        """
        return self._server_proxy.isCustomKWKey(key)

    def isGenDataKey(self, key):
        """
        Check if a key is of CustomKW type
        @param key: The key to check
        @type key: str
        @rtype: bool
        """
        return self._server_proxy.isGenDataKey(key)
开发者ID:akva2,项目名称:ert,代码行数:104,代码来源:ertrpcclient.py


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