root / trunk / twisted / tap / telnet.py

Revision 25168, 0.8 kB (checked in by exarkun, 8 months ago)

Merge remove-mktap-3393

Author: kehander1, exarkun
Reviewer: ralphm, itamar
Fixes: #3393

Remove almost all references to mktap(1) from the Twisted documentation.

The finger tutorial still refers to mktap since it also contains an
old-style plugin which will not work with twistd.

Line 
1
2 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3 # See LICENSE for details.
4
5
6 """
7 Support module for making a telnet server with twistd.
8 """
9
10 from twisted.manhole import telnet
11 from twisted.python import usage
12 from twisted.application import strports
13
14 class Options(usage.Options):
15     synopsis = "[options]"
16     longdesc = "Makes a telnet server to a Python shell."
17     optParameters = [
18          ["username", "u", "admin","set the login username"],
19          ["password", "w", "changeme","set the password"],
20          ["port", "p", "4040", "port to listen on"],
21     ]
22     zsh_actions = {"username":"_users"}
23
24 def makeService(config):
25     t = telnet.ShellFactory()
26     t.username, t.password = config['username'], config['password']
27     s = strports.service(config['port'], t)
28     t.setService(s)
29     return s
Note: See TracBrowser for help on using the browser.