Give our debugserver a reasonable starting environment
This commit is contained in:
parent
d0d81fc152
commit
61aafbe028
|
@ -144,7 +144,6 @@ See the following bug report for more details:
|
|||
pass
|
||||
|
||||
import terminatorlib.debugserver as debugserver
|
||||
(serverthread, server) = debugserver.spawn()
|
||||
import threading
|
||||
|
||||
gtk.gdk.threads_init()
|
||||
|
@ -153,6 +152,7 @@ See the following bug report for more details:
|
|||
term = Terminator (options.profile, command, options.fullscreen, options.maximise,
|
||||
options.borderless, options.no_gconf)
|
||||
|
||||
(serverthread, server) = debugserver.spawn(locals())
|
||||
gtk.main()
|
||||
|
||||
# guithread = threading.Thread(target=gtk.main, name="Main GUI thread")
|
||||
|
|
|
@ -18,9 +18,11 @@ import rlcompleter
|
|||
import re
|
||||
|
||||
class PythonConsoleServer(SocketServer.BaseRequestHandler):
|
||||
env = None
|
||||
def setup(self):
|
||||
dbg('debugserver: connect from %s' % str(self.client_address))
|
||||
self.console = TerminatorConsole()
|
||||
dbg('debugserver: env=%s' % repr(PythonConsoleServer.env))
|
||||
self.console = TerminatorConsole(PythonConsoleServer.env)
|
||||
|
||||
def handle(self):
|
||||
dbg("debugserver: handling")
|
||||
|
@ -138,8 +140,9 @@ def server():
|
|||
print "Serving on %s" % str(tcpserver.server_address)
|
||||
tcpserver.serve_forever()
|
||||
|
||||
def spawn():
|
||||
def spawn(env):
|
||||
# server()
|
||||
PythonConsoleServer.env = env
|
||||
# tcpserver = SocketServer.ThreadingTCPServer(('', 0), PythonConsoleServer)
|
||||
tcpserver = SocketServer.TCPServer(('', 0), PythonConsoleServer)
|
||||
print("debugserver: listening on %s" % str(tcpserver.server_address))
|
||||
|
|
Loading…
Reference in New Issue