On Fri, Mar 11, 2011 at 8:55 AM, Alexander Kapps <alex.ka...@web.de> wrote: > On 10.03.2011 23:25, Nobody wrote: > Unless I misunderstand something, it is possible (at least on Linux): > > Two terminal windows: > > 1: > alex@frittenbude:~$ grep foobar > > 2: > alex@frittenbude:~$ ps ax|grep 'grep foobar' > 13075 pts/4 S+ 0:00 grep --color=auto grep foobar > alex@frittenbude:~$ echo foobar > /proc/13075/fd/0
This works fine on the Linux platform (perhaps other UNIX-like platforms have similar concepts). You're simply writing to the processes's stdin (file descriptor of 0) Probably not a portable solution. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list