Calling subprocess with arguments

Tyler Laing trinioler at gmail.com
Fri Jun 19 11:07:29 EDT 2009


I can't use communicate, as it waits for the child process to terminate.
Basically it blocks. I'm trying to have dynamic communication between the
python program, and vlc.

On Fri, Jun 19, 2009 at 8:05 AM, Charles Yeomans <charles at declaresub.com>wrote:

>
> On Jun 19, 2009, at 10:55 AM, Tyler Laing wrote:
>
> So no one has an answer for why passing flags and the values the flags need
> through subprocess does not work? I would like an answer. I've examined all
> the examples I could find online, which were all toy examples, and not
> helpful to my problem.
>
> On Thu, Jun 18, 2009 at 7:40 PM, Tyler Laing <trinioler at gmail.com> wrote:
>
>> I've been trying any variation I can think of to do this properly, but
>> here's my problem:
>>
>> I want to execute this command string: vlc -I rc
>>
>> This allows vlc to be controlled via  a remote interface instead of the
>> normal gui interface.
>>
>> Now, say, I try this from subprocess:
>>
>> >>>p=subprocess.Popen('vlc -I rc test.avi'.split(' '), shell=False,
>> stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
>>
>> But I don't get the remote interface. I get the normal gui interface. So
>> how do I do it? I've tried passing ['vlc', '-I', 'rc'], I've tried ['-I',
>> 'rc'] with executable set to 'vlc'. I've had shell=True, I've had
>> shell=False. I've tried all these combinations.
>>
>> What am I doing wrong?
>>
>
> You might try
>
> p = subprocess.Popen('vlc -I rc test.avi', ...
>
> Charles Yeomans
>
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090619/fe8cfe79/attachment.html>


More information about the Python-list mailing list