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


Python EventHandler.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
    def __init__(self, task=task_self()):
        EventHandler.__init__(self)
        self.task = task

        # Action duration
        self.start = None
        self.duration = None
开发者ID:kcgthb,项目名称:lustre-shine,代码行数:9,代码来源:Action.py

示例2: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
 def __init__(self, task, total):
     EventHandler.__init__(self)
     self.task = task
     self.total = total
     self.cnt_last = -1
     self.tslen = len(str(self.total))
     self.wholelen = 0
     self.started = False
开发者ID:brianpkelly,项目名称:clustershell,代码行数:10,代码来源:Clush.py

示例3: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
 def __init__(self, task, total):
     EventHandler.__init__(self)
     self.task = task
     self.total = total
     self.cnt_last = -1
     self.tslen = len(str(self.total))
     self.wholelen = 0
     self.started = False
     # updated by worker handler for progress
     self.start_time = 0
     self.bytes_written = 0
开发者ID:thiell,项目名称:clustershell,代码行数:13,代码来源:Clush.py

示例4: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
    def __init__(self):
        """
        """
        EventHandler.__init__(self)
        
        self.exit = False
        self.worker = None

        self._xml_reader = XMLReader()
        self._parser = xml.sax.make_parser(["IncrementalParser"])
        self._parser.setContentHandler(self._xml_reader)

        self.logger = logging.getLogger(__name__)
开发者ID:akatrevorjay,项目名称:clustershell,代码行数:15,代码来源:Communication.py

示例5: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
    def __init__(self, error_response=False):
        """
        """
        EventHandler.__init__(self)

        self.worker = None

        # channel state flags
        self.opened = False
        self.setup = False
        # will this channel send communication error responses?
        self.error_response = error_response

        self._xml_reader = XMLReader()
        self._parser = xml.sax.make_parser(["IncrementalParser"])
        self._parser.setContentHandler(self._xml_reader)

        self.logger = logging.getLogger(__name__)
开发者ID:jasonshih,项目名称:clustershell,代码行数:20,代码来源:Communication.py

示例6: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
    def __init__(self, task, gwchan, srcwkr):
        EventHandler.__init__(self)
        self.gwchan = gwchan    # gateway channel
        self.srcwkr = srcwkr    # id of distant parent TreeWorker
        self.worker = None      # local TreeWorker instance
        self.retcodes = {}      # self-managed retcodes
        self.logger = logging.getLogger(__name__)

        # Grooming initialization
        self.timer = None
        qdelay = task.info("grooming_delay")
        if qdelay > 1.0e-3:
            # Enable messages and rc grooming - enable msgtree (#181)
            task.set_default("stdout_msgtree", True)
            task.set_default("stderr_msgtree", True)
            # create auto-closing timer object for grooming
            self.timer = task.timer(qdelay, self, qdelay, autoclose=True)

        self.logger.debug("TreeWorkerResponder initialized grooming=%f", qdelay)
开发者ID:cea-hpc,项目名称:clustershell,代码行数:21,代码来源:Gateway.py

示例7: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
 def __init__(self, action):
     EventHandler.__init__(self)
     assert action, "should not be be None"
     # Current action hooked to the handler
     self._action = action
开发者ID:mdlx,项目名称:milkcheck,代码行数:7,代码来源:Action.py

示例8: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
 def __init__(self, worker):
     EventHandler.__init__(self)
     self.ext_worker = worker
     self.testtimer = False
开发者ID:ChristianKniep,项目名称:clustershell,代码行数:6,代码来源:TaskDistantPdshTest.py

示例9: __init__

# 需要导入模块: from ClusterShell.Event import EventHandler [as 别名]
# 或者: from ClusterShell.Event.EventHandler import __init__ [as 别名]
 def __init__(self, result):
     """Initialize our event handler with a ref to our result object."""
     EventHandler.__init__(self)
     self.result = result
开发者ID:cea-hpc,项目名称:clustershell,代码行数:6,代码来源:check_nodes.py


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