5

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.

4 Answers 4

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

I think you should base your server class on the SocketServer class from the standard library. You'll need to write a RequestHandler to read and echo input but a lot of the heavy lifting is already done for you.

You can use the ThreadingMixIn to make the server multi-threaded very easily.

1 Comment

I believe the better practice is to use "select" instead of threading on a server. ilab.cs.byu.edu/python/select/echoserver.html
0

Try to use xmlrpc namespace

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.