[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xaudio-sdk
Subject:    Re: Python
From:       nirva () ishiboo ! com (Danny Dulai)
Date:       1999-10-02 7:46:04
[Download RAW message or body]

---------------------------------------------------------------------
Email sent to all subscriber or the xaudio-sdk@mpegtv.com mailing list
---------------------------------------------------------------------

On 10/01/99, Bryan Fordham said:
>I'm trying to use python to control xaudio.  Looking at the source to the
>perl examples, I did (what I thought was) basically the same thing: opened a
>pipe to rxaudio.
>
>    import popen2
>    r,w=popen2.popen2('rxaudio')
>    r.readline()
>
>Code like the above returns the message the rxaudio is up and running.  But
>I can not seem to send any commands to it.  Nothing; and I can't even get an
>error message back, even when I send bad commands on purpose.
>
>Any help would be appreciated

I don't know Python, but the popen() libc function can only be used for
reading or writing, but not both (portably).

you need to open it for both reading and writing, so 2 pipes, a fork, and
an exec is a way to do this. popen() is required to do at least one pipe,
but not both. you are probably experiencing that limitation. maybe you can
do the fork and pipes and exec yourself.


-- 
___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            nirva@ishiboo.com
_____________________________________________________________________
To unsubscribe, send a mail to xaudio-sdk-request@mpegtv.com
with the word "unsubscribe" in the BODY of the message

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic