From 98ce9acb56a57399350a77991d6cf66504fa0e1a Mon Sep 17 00:00:00 2001 From: helmutm Date: Sat, 18 Feb 2006 11:31:49 +0000 Subject: [PATCH] Created twisted package with manhole stuff git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1085 fd906abe-77d9-0310-91a1-e0d9ade77398 --- twisted/manhole.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/twisted/manhole.py b/twisted/manhole.py index 3f14fb4..fe6e08e 100644 --- a/twisted/manhole.py +++ b/twisted/manhole.py @@ -31,9 +31,6 @@ def printTime(): print 'twisted.manhole running:', time.strftime('%H:%M:%S') reactor.callLater(60, printTime) -#reactor.callLater(10, stopReactor) -#reactor.listenTCP(5222, EchoServerFactory()) - def help(): info = """ Use dir() to see what variables and functions are available.""" @@ -49,6 +46,7 @@ def help(): print zopeInfo print + def startup(event=None, port=5001): global hasZope printTime() @@ -60,10 +58,11 @@ def startup(event=None, port=5001): hasZope = False d.update(locals()) namespace = {} - for key in ('__builtins__', 'event', 'setSite', 'hasZope', 'zapi', 'root', - '__doc__', 'help'): + for key in ('__builtins__', 'conn', 'event', 'setSite', 'hasZope', 'zapi', + 'root', '__doc__', 'help'): if key in d: namespace[key] = d[key] + # TODO: get admin password from somewhere else or use a real checker. reactor.listenTCP(port, getManholeFactory(namespace, admin='aaa')) if __name__ == '__main__': @@ -73,4 +72,3 @@ if __name__ == '__main__': startup(port=port) reactor.run() - \ No newline at end of file