On Fri, 19 Jun 2009 07:55:19 -0700
Tyler Laing <trinio...@gmail.com> wrote:

> 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?

Write a simple script:

  #!/usr/bin/env python
  import sys
  open('/tmp/argv', 'w').write(repr(sys.argv))

And replace 'vlc' with a path to this script, then invoke it from a
shell, compare the results.
If it gets the right stuff, try the same with os.environ (prehaps vlc
keeps socket location there, just like ssh/gpg-agents?).

-- 
Mike Kazantsev // fraggod.net

Attachment: signature.asc
Description: PGP signature

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

Reply via email to