Line-by-line processing when stdin is not a tty

Tim Harig usernet at
Wed Aug 11 19:56:13 CEST 2010

On 2010-08-11, RG <rNOSPAMon at> wrote:
> I'm writing a system in a different language but want to use a Python 
> library.  I know of lots of ways to do this (embed a Python interpreter, 
> fire up a python server) but by far the easiest to implement is to have 
> the main program spawn a Python interpreter and interact with it through 
> its stdin/stdout.

Or, open python using a socket.  That way you have total control over how
the information is transfered, as well as bi-directional transfer.

More information about the Python-list mailing list