def __init__(self, core): self._core = core parser = optparse.OptionParser( usage="usage: %prog [global_options] -f web [-- options]") parser.add_option("-H", "--host", dest="host", default="127.0.0.1", help="The address to listen on") parser.add_option("-P", "--port", dest="port", default=8080, help="The port to listen on") (self._options, self._args) = parser.parse_args(self._core.extra_args) Backend.__init__(self, core)
def __init__(self, amsn_core): try: os.remove("/tmp/test.in") except: pass try: os.remove("/tmp/test.out") except: pass open("/tmp/test.in","w").close() open("/tmp/test.out","w").close() os.chmod("/tmp/test.in",0666) os.chmod("/tmp/test.out",0666) Backend.__init__(self,"/tmp/test.in","/tmp/test.out") self._amsn_core = amsn_core self._amsn_core.timer_add(1,self.checkEvent)
def __init__(self, amsn_core): try: os.remove("/tmp/test.in") except: pass try: os.remove("/tmp/test.out") except: pass open("/tmp/test.in", "w").close() open("/tmp/test.out", "w").close() os.chmod("/tmp/test.in", 0666) os.chmod("/tmp/test.out", 0666) Backend.__init__(self, "/tmp/test.in", "/tmp/test.out") self._amsn_core = amsn_core self._amsn_core.timerAdd(1, self.checkEvent)
def __init__(self, amsn_core): Backend.__init__(self) self._amsn_core = amsn_core self._amsn_core.timer_add(750, self.check_event)
def __init__(self, amsn_core): Backend.__init__(self, amsn_core) self._amsn_core = amsn_core