process stdin grab

Seltzer squabbit7 at gmail.com
Fri Jun 29 02:17:31 CEST 2007


thanks for the suggestions.
I'm not able to modify the mplayer command...
and they do not create a fifo

and yes, i meant 'pid', sorry.

-felix

On 6/28/07, Will Maier <willmaier at ml1.net> wrote:
>
> On Thu, Jun 28, 2007 at 08:01:18PM +0000, Seltzer wrote:
> > I need to send commands to a process that i did not start.
> > (mplayer specifically) I have the PIP of the process, and thats
> > about all.
>
> I assume you mean 'PID'. This is somewhat offtopic, but mplayer
> supports receiving commands from a FIFO:
>
>     mplayer -quiet -slave -idle -input file=/home/you/.mplayer/fifo
>
> Then you can write commands (like 'loadfile song.ogg') to the fifo.
> Doing this in Python is as trivial as opening, writing to, and
> closing a file object.
>
> > Any ideas on how to do this in python? i need only to write to its
> > stdin, not read any information from it, and i don't really need
> > to know if my command worked for now, so error handling isn't
> > really an issue.
>
> I don't know of any magic to write to a running program's stdin.
>
> --
>
> [Will Maier]-----------------[willmaier at ml1.net|http://www.lfod.us/]
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070628/668157ab/attachment.html>


More information about the Python-list mailing list