Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release > by-pkgid > 248e2f92d9b832e75f95c6042e4252e2 > files > 2624

python-twisted-16.3.2-1.mga6.i586.rpm

# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

# You can run this .tac file directly with:
#    twistd -ny demo.tac

"""Nearly pointless demonstration of the manhole interactive interpreter.

This does about the same thing as demo_manhole, but uses the tap
module's makeService method instead.  The only interesting difference
is that in this version, the telnet server also requires
authentication.

Note, you will have to create a file named \"passwd\" and populate it
with credentials (in the format of passwd(5)) to use this demo.
"""

from twisted.application import service
application = service.Application("TAC Demo")

from twisted.conch import manhole_tap
manhole_tap.makeService({"telnetPort": "tcp:6023",
                         "sshPort": "tcp:6022",
                         "namespace": {"foo": "bar"},
                         "passwd": "passwd"}).setServiceParent(application)