Re: calling subprocess

2015-02-22 Thread Dave Angel
On 02/22/2015 09:38 PM, Dave Angel wrote: On 02/22/2015 08:13 PM, jkuplin...@gmail.com wrote: OK (1) sorry about for/from That's not what you should be sorry about. You should be sorry you didn't use cut&paste. (2) print() sounds nice, but fact is , no matter what I try, i always get C:\\a

Re: calling subprocess

2015-02-22 Thread Dave Angel
On 02/22/2015 08:13 PM, jkuplin...@gmail.com wrote: OK (1) sorry about for/from That's not what you should be sorry about. You should be sorry you didn't use cut&paste. (2) print() sounds nice, but fact is , no matter what I try, i always get C:\\apps instead of c:\apps. So in this sense

Re: calling subprocess

2015-02-22 Thread Chris Angelico
On Mon, Feb 23, 2015 at 12:13 PM, wrote: > (2) print() sounds nice, but fact is , no matter what I try, i always get > C:\\apps instead of c:\apps. So in this sense print() doesn't help much. > Obviously i'm doing something wrong -- which is what you perhaps call shotgun > debugging; but that'

Re: calling subprocess

2015-02-22 Thread jkuplinsky
On Sunday, February 22, 2015 at 5:22:24 PM UTC-5, Chris Angelico wrote: > On Mon, Feb 23, 2015 at 9:06 AM, wrote: > > I thought this would be easy: > > > > > > for subprocess import call > > call (['cd', r'C:\apps'], shell = True) > > > > > > It doesn't work -- tried with/without prefix r, escape

Re: calling subprocess

2015-02-22 Thread Chris Angelico
On Mon, Feb 23, 2015 at 9:06 AM, wrote: > I thought this would be easy: > > > for subprocess import call > call (['cd', r'C:\apps'], shell = True) > > > It doesn't work -- tried with/without prefix r, escaped backslashes, triple > quotes, str(), .. nothing seems to work (it doesn't complain, but

Re: calling subprocess

2015-02-22 Thread Tim Golden
On 22/02/2015 22:06, jkuplin...@gmail.com wrote: Hi, I thought this would be easy: for subprocess import call call (['cd', r'C:\apps'], shell = True) It doesn't work -- tried with/without prefix r, escaped backslashes, triple quotes, str(), .. nothing seems to work (it doesn't complain, but

calling subprocess

2015-02-22 Thread jkuplinsky
Hi, I thought this would be easy: for subprocess import call call (['cd', r'C:\apps'], shell = True) It doesn't work -- tried with/without prefix r, escaped backslashes, triple quotes, str(), .. nothing seems to work (it doesn't complain, but it doesn't change directories either) -- what am

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 wrote:

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 wrote: > On Fri, 19 Jun 2009 22:00:28 +0600 > Mike Kazantsev wrote: > > > On Fri, 19 Jun 2009 08:28:17 -0700 > > Tyler Laing wrote: > > >

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 22:00:28 +0600 Mike Kazantsev wrote: > On Fri, 19 Jun 2009 08:28:17 -0700 > Tyler Laing 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 a

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 08:28:17 -0700 Tyler Laing 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 second results, f

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': '/tmp/orbit-tyler'

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 08:07:29 -0700 Tyler Laing 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 it out-of-the-box

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 07:55:19 -0700 Tyler Laing 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'.spl

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 wrote: > > On Jun 19, 2009, at 10:55 AM, Tyler Laing wrote: > > So no one ha

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 T

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 wrote:

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('v