Пример #1
0
 def _testPlanetPythonFeeds(self, feeds, timeout):
     if VERBOSE:
         import introspector
         introspector.activate()
     self._configureFeeds()
     configuration = self._createConfiguration(feeds, PLANET_PYTHON_FEEDS_PATH)
     fd, name = tempfile.mkstemp()
     os.close(fd)
     try:
         open(name, 'w').write(configuration)
         kamPlanet = KamPlanet.KamPlanet(name)
         kamPlanet.start()
         self.initializeSystem(kamPlanet.component)
         self.assertFinished(timeout=timeout)
     finally:
         os.remove(name)
Пример #2
0
 def _testPlanetPythonFeeds(self, feeds, timeout):
     if VERBOSE:
         import introspector
         introspector.activate()
     self._configureFeeds()
     configuration = self._createConfiguration(feeds,
                                               PLANET_PYTHON_FEEDS_PATH)
     fd, name = tempfile.mkstemp()
     os.close(fd)
     try:
         open(name, 'w').write(configuration)
         kamPlanet = KamPlanet.KamPlanet(name)
         kamPlanet.start()
         self.initializeSystem(kamPlanet.component)
         self.assertFinished(timeout=timeout)
     finally:
         os.remove(name)
Пример #3
0
                )
    parser.add_option("-i", "--introspector", 
                    action="store_true", 
                    dest="introspector",
                    help="activate introspector module: more information will be provided but the program will never finish", 
                    default=False
                )
    parser.add_option("-p", "--rt-debugger-port",
                    dest="debuggerPort",
                    help="real-time debugger port (only launched if provided)", 
                    metavar="PORT",
                    default=None
                )
               
    options, _ = parser.parse_args()
    if options.introspector:
        import introspector
        introspector.activate()
    if options.debuggerPort:
        try:
            port = int(options.debuggerPort)
        except ValueError, ve:
            print >> sys.stderr, "Invalid debugger port found: <%s>; skipping debugger" % options.debuggerPort
        else:
            import rt_debugger
            rt_debugger.launch_debugger(port)
            
    kamPlanet = KamPlanet(options.configFile)
    kamPlanet.start()
    kamPlanet.component.run()
Пример #4
0
        "--introspector",
        action="store_true",
        dest="introspector",
        help=
        "activate introspector module: more information will be provided but the program will never finish",
        default=False)
    parser.add_option(
        "-p",
        "--rt-debugger-port",
        dest="debuggerPort",
        help="real-time debugger port (only launched if provided)",
        metavar="PORT",
        default=None)

    options, _ = parser.parse_args()
    if options.introspector:
        import introspector
        introspector.activate()
    if options.debuggerPort:
        try:
            port = int(options.debuggerPort)
        except ValueError, ve:
            print >> sys.stderr, "Invalid debugger port found: <%s>; skipping debugger" % options.debuggerPort
        else:
            import rt_debugger
            rt_debugger.launch_debugger(port)

    kamPlanet = KamPlanet(options.configFile)
    kamPlanet.start()
    kamPlanet.component.run()