<p>You can embed the <a href="http://ipython.scipy.org/" rel="noreferrer">IPython</a> shell inside of your application so that it launches the shell in the foreground.  Is there a way to embed a telnet server in a python app so that you can telnet to a certain port and launch a remote IPython shell?  </p>

<p>Any tips for redirecting the input/output streams for IPython or how to hook it up to a telnet server library or recommendations for other libraries that could be used to implement this are much appreciated.  </p>

[{'answer_id': 48214, 'author': 'Nick Retallack', 'author_id': 2653, 'author_profile': 'https://Stackoverflow.com/users/2653', 'pm_score': 2, 'selected': False, 'text': '<p>Python includes a <a href="http://www.python.org/doc/lib/module-telnetlib.html" rel="nofollow noreferrer">telnet client</a>, but not a telnet server.  You can implement a telnet server using <a href="http://twistedmatrix.com" rel="nofollow noreferrer">Twisted</a>.  <a href="http://twistedmatrix.com/pipermail/twisted-python/2004-August/008335.html" rel="nofollow noreferrer">Here\'s an example</a>.  As for hooking these things together, that\'s up to you.</p>\n'}, {'answer_id': 48266, 'author': 'David Webb', 'author_id': 3171, 'author_profile': 'https://Stackoverflow.com/users/3171', 'pm_score': 0, 'selected': False, 'text': '<p>I think you should base your server class on the <a href="http://www.python.org/doc/lib/module-SocketServer.html" rel="nofollow noreferrer"><code>SocketServer</code></a> class from the standard library.  You\'ll need to write a <code>RequestHandler</code> to read and echo input but a lot of the heavy lifting is already done for you.</p>\n\n<p>You can use the <a href="http://docs.python.org/lib/node632.html" rel="nofollow noreferrer"><code>ThreadingMixIn</code></a> to make the server multi-threaded very easily.  </p>\n'}, {'answer_id': 55654, 'author': 'John Millikin', 'author_id': 3560, 'author_profile': 'https://Stackoverflow.com/users/3560', 'pm_score': 1, 'selected': False, 'text': '<p>Use Twisted Manhole. Docs are a bit lacking, but it\'s easy enough to set up a telnet-based remote server and it comes with a GTK-based GUI.</p>\n\n<ul>\n<li><a href="http://twistedmatrix.com/" rel="nofollow noreferrer">Main Twisted site</a></li>\n<li><a href="http://twistedmatrix.com/documents/8.1.0/api/twisted.manhole.html" rel="nofollow noreferrer">twisted.manhole API docs</a></li>\n</ul>\n'}, {'answer_id': 1764950, 'author': 'Elalfer', 'author_id': 195447, 'author_profile': 'https://Stackoverflow.com/users/195447', 'pm_score': 0, 'selected': False, 'text': '<p>Try to use xmlrpc namespace</p>\n'}]
['https://Stackoverflow.com/questions/48176', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4883/']