Пример #1
0
 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)
Пример #2
0
Файл: main.py Проект: Kjir/amsn2
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 def __init__(self, amsn_core):
     Backend.__init__(self)
     self._amsn_core = amsn_core
     self._amsn_core.timer_add(750, self.check_event)
Пример #6
0
 def __init__(self, amsn_core):
     Backend.__init__(self, amsn_core)
     self._amsn_core = amsn_core