Package twisted :: Package manhole :: Module telnet :: Class Shell

[show private | hide private]
[frames | no frames]

## Class Shell

    BaseProtocol --+
                   |
            Protocol --+
                       |
                  Telnet --+
                           |
                          Shell

A Python command-line shell.

Method Summary
| `checkUserAndPass(self, username, password)`
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down. (inherited from `Protocol`)
| ``connectionMade`(self)` I will write a welcomeMessage and loginPrompt to the client.
| ``dataReceived`(self, data)` Called whenever data is received. (inherited from `Telnet`)
| `doCommand(self, cmd)`
| `iac_DO(self, feature)` (inherited from `Telnet`)
| `iac_DONT(self, feature)` (inherited from `Telnet`)
| `iac_IP(self, feature)` (inherited from `Telnet`)
| `iac_WILL(self, feature)` (inherited from `Telnet`)
| `iac_WONT(self, feature)` (inherited from `Telnet`)
| `iacSBchunk(self, chunk)` (inherited from `Telnet`)
| ``loggedIn`(self)` Called after the user succesfully logged in.
| ``loginPrompt`(self)` Override me to return a 'login:'-type prompt. (inherited from `Telnet`)
| ``makeConnection`(self, transport)` Make a connection to a transport and a server. (inherited from `BaseProtocol`)
| ``processChunk`(self, chunk)` I take a chunk of data and delegate out to telnet_* methods by way of processLine. (inherited from `Telnet`)
| ``processLine`(self, line)` I call a method that looks like 'telnet_*' where '*' is filled in by the current mode. (inherited from `Telnet`)
| ``telnet_Command`(self, cmd)` The default 'command processing' mode.
| ``telnet_Password`(self, paswd)` I accept a password as an argument, and check it with the checkUserAndPass method. (inherited from `Telnet`)
| ``telnet_User`(self, user)` I take a username, set it to the 'self.username' attribute, print out a password prompt, and switch to 'Password' mode. (inherited from `Telnet`)
| ``welcomeMessage`(self)` Override me to return a string which will be sent to the client before login. (inherited from `Telnet`)
| ``write`(self, data)` Write some data to the transport.

Method Details

### connectionMade(self)

I will write a welcomeMessage and loginPrompt to the client.

  Overrides:
    `twisted.protocols.telnet.Telnet.connectionMade` (inherited documentation)

### loggedIn(self)

Called after the user succesfully logged in.

Override in subclasses.

  Overrides:
    `twisted.protocols.telnet.Telnet.loggedIn` (inherited documentation)

### telnet_Command(self, cmd)

The default 'command processing' mode. You probably want to override me.

  Overrides:
    `twisted.protocols.telnet.Telnet.telnet_Command` (inherited documentation)

### write(self, data)

Write some data to the transport.

Generated by Epydoc 1.1 on Thu May 8 13:18:33 2003 | http://epydoc.sf.net