[Tutor] Connecting to interactive program

Vincent Nijs v-nijs at kellogg.northwestern.edu
Tue Dec 7 20:38:13 CET 2004


Has anyone ever tried to send commands to a running interactive python
session from, say, the command line or another app?

If so, please let me know how you achieved this.

Vincent


On 12/1/04 4:10 PM, "Vincent Nijs" <v-nijs at kellogg.northwestern.edu> wrote:

> Hi,
> 
> I am trying to send information from an editor (vim) to an interative
> program (say the Python commandline, R, Matlab, etc.).
> 
> I have tried to connect a named pipe to the interactive program using
> mkfifo. For some reason this doesn't work properly however (<eof> seems to
> be the first thing sent).
> 
> Could anyone provide a very very simple example where from a terminal
> command line I could send, say, 'x=3' to an open interactive python session?
> I'd like to have something that works on WinXP and Mac (or Linux).
> 
> Thanks!
> 
> Vincent

-- 





More information about the Tutor mailing list