FAQ
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
hugol at fastmail.net

Search Discussions

  • Tim Harig at Nov 25, 2010 at 11:18 pm

    On 2010-11-25, Hugo L?veill? 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")
  • News123 at Nov 26, 2010 at 10:11 am

    On 11/26/2010 12:18 AM, Tim Harig wrote:
    On 2010-11-25, Hugo L?veill? 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
  • MRAB at Nov 26, 2010 at 12:27 am

    On 25/11/2010 22:56, Hugo L?veill? 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.

    How can I start a app inside this folder ?
    Try passing the application path and its arguments (if any) as a list
    like this:

    subprocess.Popen([app_path, arg1, arg2])
  • Dave Angel at Nov 26, 2010 at 5:06 am

    On 01/-10/-28163 02:59 PM, Hugo L?veill? 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.

    How can I start a app inside this folder ?

    Thanks
    How about you show us exactly what you are doing, and just what you mean
    by "no luck" ? You also should tell us what version of Python you're
    running, and mention that you're on Windows (presumably, but not
    necessarily).

    Perhaps you're using shell=True, perhaps you have an executable in the
    root directory called c:\program.exe, Perhaps you're passing
    arguments, but not putting them in separate list items. Who knows?

    DaveA

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedNov 25, '10 at 10:56p
activeNov 26, '10 at 10:11a
posts5
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase