Package twisted :: Package manhole :: Module service

[frames | no frames]

## Module twisted.manhole.service

`twisted.manhole` `PB` service implementation.

Classes
`FakeStdIO` |
`IManholeClient` |
`Perspective` |
`Realm` |
`Service` |

Function Summary
| ``_failureOldStyle`(fail)` Pre-Failure manhole representation of exceptions.
| ``runInConsole`(command, console, globalNS, localNS, filename, args, kw, unsafeTracebacks)` Run this, directing all output to the specified console.

Variable Summary
`dict` | `_defaultCapabilities` = `{'Explorer': 'Set'}`

Function Details

### _failureOldStyle(fail)

Pre-Failure manhole representation of exceptions.

For compatibility with manhole clients without the "Failure" capability.

A dictionary with two members:

- 'traceback' -- traceback.extract_tb output; a list of tuples (filename, line number, function name, text) suitable for feeding to traceback.format_list.
- 'exception' -- a list of one or more strings, each ending in a newline. (traceback.format_exception_only output)

### runInConsole(command, console, globalNS=None, localNS=None, filename=None, args=None, kw=None, unsafeTracebacks=0)

Run this, directing all output to the specified console.

If command is callable, it will be called with the args and keywords provided. Otherwise, command will be compiled and eval'd. (Wouldn't you like a macro?)

Returns the command's return value.

The console is called with a list of (type, message) pairs for display, see `IManholeClient.console`.

Variable Details

### _defaultCapabilities

  Type:
    `dict`
  Value:

        {'Explorer': 'Set'}

Generated by Epydoc 2.0 on Sat May 15 20:08:08 2004 | http://epydoc.sf.net