Re: Newbie subprocess question



On 11/26/2010 12:18 AM, Tim Harig wrote:
On 2010-11-25, Hugo Léveillé <hugol@xxxxxxxxxxxx> 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

.



Relevant Pages

  • Re: Newbie subprocess question
    ... The problem is with application inside "Program Files". ... looks like subprocess is stopping the application string after ... I tried puting the programe name inside double quote like ...
    (comp.lang.python)
  • Newbie subprocess question
    ... The problem is with application inside "Program Files". ... looks like subprocess is stopping the application string after ... TD Compositing, Vision Globale ...
    (comp.lang.python)
  • Re: Newbie subprocess question
    ... looks like subprocess is stopping the application string after ... I tried puting the programe name inside double quote like ... How about you show us exactly what you are doing, and just what you mean by "no luck"? ...
    (comp.lang.python)
  • Re: Newbie subprocess question
    ... The problem is with application inside "Program Files". ... looks like subprocess is stopping the application string after ... I tried puting the programe name inside double quote like ...
    (comp.lang.python)
  • Re: Is the DCL SEARCH utility callable from FORTRAN?
    ... FORTRAN applicaiton. ... the SEARCH utility doesn't have a callable interface. ... can redirect the input and output files of the subprocess if needed. ... Fortran has some functions available to help with string handling. ...
    (comp.os.vms)