~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/doc/conch/examples/demo.tac

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
 
2
# See LICENSE for details.
 
3
 
 
4
# You can run this .tac file directly with:
 
5
#    twistd -ny demo.tac
 
6
 
 
7
"""Nearly pointless demonstration of the manhole interactive interpreter.
 
8
 
 
9
This does about the same thing as demo_manhole, but uses the tap
 
10
module's makeService method instead.  The only interesting difference
 
11
is that in this version, the telnet server also requires
 
12
authentication.
 
13
 
 
14
Note, you will have to create a file named \"passwd\" and populate it
 
15
with credentials (in the format of passwd(5)) to use this demo.
 
16
"""
 
17
 
 
18
from twisted.application import service
 
19
application = service.Application("TAC Demo")
 
20
 
 
21
from twisted.conch import manhole_tap
 
22
manhole_tap.makeService({"telnetPort": "tcp:6023",
 
23
                         "sshPort": "tcp:6022",
 
24
                         "namespace": {"foo": "bar"},
 
25
                         "passwd": "passwd"}).setServiceParent(application)