Re: Calling subprocess with arguments

2009-06-19 Thread Tyler Laing
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

Re: Calling subprocess with arguments

2009-06-19 Thread Javier Collado
Hello, The problem might be that, aside from creating the Popen object, to get the command run you need to call 'communicate' (other options, not used with the Popen object directly, are 'call' or 'waitpid' as explained in the documentation). Did you do that? Best regards, Javier 2009/6/19

Re: Calling subprocess with arguments

2009-06-19 Thread Tyler Laing
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 char...@declaresub.comwrote: On Jun 19, 2009, at 10:55 AM, Tyler Laing

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
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

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 08:07:29 -0700 Tyler Laing trinio...@gmail.com wrote: 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. Unfortunately, subprocess module doesn't allow

Re: Calling subprocess with arguments

2009-06-19 Thread Tyler Laing
Thanks mike, the idea that maybe some of the info isn't being passed is certainly interesting. Here's the output of os.environ and sys.argv: ty...@surak:~$ cat environ {'XAUTHORITY': '/home/tyler/.Xauthority', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'ORBIT_SOCKETDIR':

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 08:28:17 -0700 Tyler Laing trinio...@gmail.com wrote: Thanks mike, the idea that maybe some of the info isn't being passed is certainly interesting. Here's the output of os.environ and sys.argv: ... I'm afraid these doesn't make much sense without the output from the

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 22:00:28 +0600 Mike Kazantsev mk.frag...@gmail.com wrote: On Fri, 19 Jun 2009 08:28:17 -0700 Tyler Laing trinio...@gmail.com wrote: Thanks mike, the idea that maybe some of the info isn't being passed is certainly interesting. Here's the output of os.environ and

Re: Calling subprocess with arguments

2009-06-19 Thread Tyler Laing
Sorry, XD. I'll ask the VLC people if they happen to know why VLC won't open up the remote interface. -Tyler On Fri, Jun 19, 2009 at 9:09 AM, Mike Kazantsev mk.frag...@gmail.comwrote: On Fri, 19 Jun 2009 22:00:28 +0600 Mike Kazantsev mk.frag...@gmail.com wrote: On Fri, 19 Jun 2009 08:28:17

Re: Calling subprocess with arguments

2009-06-19 Thread Tyler Laing
It appears to be an issue specifically with VLC, not subprocess. Thank you guys. The remote interface works through sockets, which is perfectly fine... if I create a local socket, I can have it connect to the socket with command line arguments. On Fri, Jun 19, 2009 at 9:30 AM, Tyler Laing

Calling subprocess with arguments

2009-06-18 Thread Tyler Laing
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