CC'd back to tutor list. ----- Original Message ----- From: "Vincent Nijs" <[EMAIL PROTECTED]> To: "Alan Gauld" <[EMAIL PROTECTED]> Sent: Tuesday, December 07, 2004 10:56 PM Subject: Re: [Tutor] Connecting to interactive program
> Alan, > > Sorry if I was unclear. > > I would like to have python program that will (1) start an interactive > session of python, r, matlab or some other program and (2) allow the user to > pass commands to that interactive session from a shell command line (e.g., > echo 'x=3'). If the python program opens the interactive session that will > also allow direct input into the interactive program by the user. That sounds pretty much what pyexpect will allow you to do. Certainly plain ol' expect does that kind of thing. Basically anything that reads stdin and displays on stdout or stderr can be driven by expect and therefore by pyexpect. > If I can get the interactive program to accept commands from a shell command > line I can figure out how to send commands from my favorite editor (VIM). Now that might be interesting :-) I assume you have the version of vim that uses python as its scripting language? Alan G. _______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor