On 10.03.2011 23:25, Nobody wrote:
On Thu, 10 Mar 2011 20:22:11 +0100, Giampaolo RodolĂ  wrote:

I think he wants to attach to another process's stdin/stdout and
read/write from/to them.
I don't know if this is possible but it would be a great addition for psutil.

It's not even a meaningful concept, let alone possible.

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

That this is *highly* system dependent, problematic in many regards and just terrible hackery is another issue.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to