1 import traceback
2 import qubx.faces
3 import qubx.pyenv
4 import qubx.task
5 from qubx.GTK import *
6 from qubx.remote_ctl import *
7
8 PORT = 25254
9
17 self.client = None
18 try:
19 self.client = self.runner.manage(qubx.sock.connect_as_client(self.host, self.port))
20 while True:
21 self.runner.process_one()
22 except KeyboardInterrupt:
23 pass
24 except:
25 traceback.print_exc()
26 if self.client:
27 self.client.stop()
28 qubx.task.Tasks.remove_task(self)
29
30
41
42
48 self.sessions.append(controller)
50 dead = []
51 for controller in self.sessions:
52 try:
53 print controller.reval(expr)
54 except:
55 traceback.print_exc()
56 controller.stop()
57 dead.append(controller)
58 for controller in dead:
59 self.sessions.remove(controller)
60