Created twisted package with manhole stuff
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1085 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c0b49805f3
commit
98ce9acb56
1 changed files with 4 additions and 6 deletions
|
@ -31,9 +31,6 @@ def printTime():
|
||||||
print 'twisted.manhole running:', time.strftime('%H:%M:%S')
|
print 'twisted.manhole running:', time.strftime('%H:%M:%S')
|
||||||
reactor.callLater(60, printTime)
|
reactor.callLater(60, printTime)
|
||||||
|
|
||||||
#reactor.callLater(10, stopReactor)
|
|
||||||
#reactor.listenTCP(5222, EchoServerFactory())
|
|
||||||
|
|
||||||
def help():
|
def help():
|
||||||
info = """
|
info = """
|
||||||
Use dir() to see what variables and functions are available."""
|
Use dir() to see what variables and functions are available."""
|
||||||
|
@ -49,6 +46,7 @@ def help():
|
||||||
print zopeInfo
|
print zopeInfo
|
||||||
print
|
print
|
||||||
|
|
||||||
|
|
||||||
def startup(event=None, port=5001):
|
def startup(event=None, port=5001):
|
||||||
global hasZope
|
global hasZope
|
||||||
printTime()
|
printTime()
|
||||||
|
@ -60,10 +58,11 @@ def startup(event=None, port=5001):
|
||||||
hasZope = False
|
hasZope = False
|
||||||
d.update(locals())
|
d.update(locals())
|
||||||
namespace = {}
|
namespace = {}
|
||||||
for key in ('__builtins__', 'event', 'setSite', 'hasZope', 'zapi', 'root',
|
for key in ('__builtins__', 'conn', 'event', 'setSite', 'hasZope', 'zapi',
|
||||||
'__doc__', 'help'):
|
'root', '__doc__', 'help'):
|
||||||
if key in d:
|
if key in d:
|
||||||
namespace[key] = d[key]
|
namespace[key] = d[key]
|
||||||
|
# TODO: get admin password from somewhere else or use a real checker.
|
||||||
reactor.listenTCP(port, getManholeFactory(namespace, admin='aaa'))
|
reactor.listenTCP(port, getManholeFactory(namespace, admin='aaa'))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -73,4 +72,3 @@ if __name__ == '__main__':
|
||||||
startup(port=port)
|
startup(port=port)
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue