[IPython-dev] Redirecting ipython in and out

Frédéric Mantegazza mantegazza at ill.fr
Mon Jun 27 02:44:57 EDT 2005


Hello Fernando,

I would like to know if it is possible to redirect ipython stdin and 
stdout ? Here is what I would be able to do:

You remember that our application embedds a ipython instance as a user 
input/output console. As it is a client connected to a server, we can 
launch several ipython instances. When a command is sent, the result is 
printed by a Pyro mecanism called Event Server on all connected clients. 
This is fine because they can see what is executed by others.

But I would like to go further: I would also like to see what other clients 
*send* to the server. I mean that when a client enter the command:

In [15]: A1.drive(10)

after the return key is pressed all clients should print :

In [xx]: A1.drive(10)

But the command should be executed only on the ipython instance where user 
entered it. Others should act as passive displays.

Do you think this is possible ? Is there a hook to do this, or do I have to 
hack a little bit the code ?

Thank's,

PS : I'm running ipython 0.6.15.

-- 
   Frédéric




More information about the IPython-dev mailing list