當前位置: 首頁>>代碼示例>>Python>>正文


Python Event.EventHandler類代碼示例

本文整理匯總了Python中ClusterShell.Event.EventHandler的典型用法代碼示例。如果您正苦於以下問題:Python EventHandler類的具體用法?Python EventHandler怎麽用?Python EventHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了EventHandler類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

    def __init__(self, task=task_self()):
        EventHandler.__init__(self)
        self.task = task

        # Action duration
        self.start = None
        self.duration = None
開發者ID:kcgthb,項目名稱:lustre-shine,代碼行數:7,代碼來源:Action.py

示例2: __init__

 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,代碼行數:8,代碼來源:Clush.py

示例3: __init__

 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,代碼行數:11,代碼來源:Clush.py

示例4: __init__

    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,代碼行數:13,代碼來源:Communication.py

示例5: __init__

    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,代碼行數:18,代碼來源:Communication.py

示例6: __init__

    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,代碼行數:19,代碼來源:Gateway.py

示例7: __init__

 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,代碼行數:5,代碼來源:Action.py

示例8: __init__

 def __init__(self, worker):
     EventHandler.__init__(self)
     self.ext_worker = worker
     self.testtimer = False
開發者ID:ChristianKniep,項目名稱:clustershell,代碼行數:4,代碼來源:TaskDistantPdshTest.py

示例9: __init__

 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,代碼行數:4,代碼來源:check_nodes.py


注:本文中的ClusterShell.Event.EventHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。