Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Newbie subprocess question

Reply
Thread Tools

Newbie subprocess question

 
 
Hugo Léveillé
Guest
Posts: n/a
 
      11-25-2010
I'm starting various application using subprocess.Popen without any
problem. The problem is with application inside "Program Files". It
looks like subprocess is stopping the application string after
"Program". I tried puting the programe name inside double quote like
'"Program File*..."'. No luck.

How can I start a app inside this folder ?

Thanks


--
Hugo Léveillé
TD Compositing, Vision Globale
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
 
 
 
Tim Harig
Guest
Posts: n/a
 
      11-25-2010
On 2010-11-25, Hugo Léveillé <(E-Mail Removed)> wrote:
> I'm starting various application using subprocess.Popen without any
> problem. The problem is with application inside "Program Files". It
> looks like subprocess is stopping the application string after
> "Program". I tried puting the programe name inside double quote like
> '"Program File*..."'. No luck.


Not sure you you are having issues.

subprocess.Popen("C:\\Program Files\\Vim\\vim73\\gvim.exe")
 
Reply With Quote
 
 
 
 
News123
Guest
Posts: n/a
 
      11-26-2010
On 11/26/2010 12:18 AM, Tim Harig wrote:
> On 2010-11-25, Hugo Léveillé <(E-Mail Removed)> wrote:
>> I'm starting various application using subprocess.Popen without any
>> problem. The problem is with application inside "Program Files". It
>> looks like subprocess is stopping the application string after
>> "Program". I tried puting the programe name inside double quote like
>> '"Program File*..."'. No luck.

>
> Not sure you you are having issues.
>
> subprocess.Popen("C:\\Program Files\\Vim\\vim73\\gvim.exe")

Above line should work.


In order to avoid the double backslashes (such, that you can just copy
paste from the windows explorer or from a
command line shell you could additionally prefix the string with r.

subprocess.Popen(r"C:\Program Files\Vim\vim73\gvim.exe")

copying and pasting reduces the risk of typos

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie subprocess.Popen performance issues/questions Chris Seberino Python 2 06-15-2010 02:37 PM
how to import subprocess into my 'subprocess.py' file hiral Python 2 05-05-2010 12:56 PM
Re: Newbie help for using multiprocessing and subprocess packages forcreating child processes Matt Python 2 06-17-2009 02:33 AM
Newbie help for using multiprocessing and subprocess packages forcreating child processes Rob Newman Python 0 06-16-2009 07:13 PM
[Subprocess/Windows] subprocess module under Windows 98 Andreas Jung Python 2 11-02-2005 05:41 PM



Advertisments