Exemplo n.º 1
0
 def show_log(self):
     """ Open log viewer.  Returns :class:`LogViewer`. """
     self("tools_menu").click()
     self("log_button").click()
     return LogViewer.verify(self.browser, self.port)
Exemplo n.º 2
0
                        dest='port',
                        help='Set base port to compute port number.')
    args = parser.parse_args()

    if args.host:
        host = args.host
    else:
        host = HOST

    if args.port:
        base_port = int(args.port)
    else:
        base_port = int(PORT)

    sys.path.append("../atp")
    protos = __import__("protos")
    protos = protos.load()

    inputs = []

    inputs.append("%s:%d@ia" % ("localhost", base_port - 1))
    inputs.append("%s:%d@ia" % (host, base_port))

    for proto in protos:
        port = base_port + protos[proto]["id"]
        inputs.append("%s:%d@atp@%s" % (host, port, proto))

    app = QtGui.QApplication(sys.argv)
    gui = LogViewer(inputs)
    os._exit(app.exec_())
Exemplo n.º 3
0
 def show_log(self):
     """ Open log viewer.  Returns :class:`LogViewer`. """
     self('tools_menu').click()
     self('log_button').click()
     return LogViewer.verify(self.browser, self.port)
Exemplo n.º 4
0
def main():
    app = QApplication(sys.argv)
    win = LogViewer()
    win.show()
    sys.exit(app.exec_())