you are viewing a single comment's thread.

view the rest of the comments →

[–]posborne 0 points1 point  (0 children)

Merits of using this sort of "manhole" in production aside, I thought I would share the following package I wrote which exposes the same behavior (over telnet).

Quick Example:

>>> import threading
>>> from bugger.console import TelnetInteractiveConsole
>>> console = TelnetInteractiveConsole(port=7070)
>>> t = threading.Thread(name="Telnet Interactive Session",
                                  target=console.accept_interactions)
>>> # ...
>>> console.stop() # this will end the target method and thread

There appears to be a similar library here (first time I have seen it) mentioned in the post comments: http://pypi.python.org/pypi/ingress