Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding a remote Python shell in an application

You can embed the IPython 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?

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.

like image 240
readonly Avatar asked Oct 14 '22 19:10

readonly


1 Answers

Python includes a telnet client, but not a telnet server. You can implement a telnet server using Twisted. Here's an example. As for hooking these things together, that's up to you.

like image 73
Nick Retallack Avatar answered Oct 18 '22 13:10

Nick Retallack