FAQ
Hello,

I have a script that launches a sequence of other programs, some GUI,
some console. I'd like the console programs to launch in their own
console window, instead of all of them sharing the script's console.
How do I do that?

I'm on Windows, and currently I'm using os.spawnl(...) to launch the
programs.

Any help is appreciated.

Thanks,

Eli

Search Discussions

  • Gregpinero at Mar 15, 2007 at 3:59 am

    On Mar 14, 9:56 pm, egla... at gmail.com wrote:
    Hello,

    I have a script that launches a sequence of other programs, some GUI,
    some console. I'd like the console programs to launch in their own
    console window, instead of all of them sharing the script's console.
    How do I do that?
    Would the subprocess module help here? It's available in Python 2.4
    onwards. I think it's supposed to be a one stop shop for all your
    external application launching needs (Python group, please correct me
    if I'm wrong here).

    -Greg
  • Laurent Pointal at Mar 15, 2007 at 9:12 am

    gregpinero at gmail.com a ?crit :
    On Mar 14, 9:56 pm, egla... at gmail.com wrote:
    Hello,

    I have a script that launches a sequence of other programs, some GUI,
    some console. I'd like the console programs to launch in their own
    console window, instead of all of them sharing the script's console.
    How do I do that?
    Would the subprocess module help here? It's available in Python 2.4
    onwards. I think it's supposed to be a one stop shop for all your
    external application launching needs (Python group, please correct me
    if I'm wrong here).

    -Greg
    Try to use "start"
    import os
    os.system("start cmd")
    Open a new console with a cmd shell in it.

    See start documentation here http://www.ss64.com/nt/start.html
    Or typing help start on the command line.
  • Eglaser at Mar 15, 2007 at 12:26 pm

    On Mar 15, 5:12 am, Laurent Pointal wrote:
    gregpin... at gmail.com a ?crit :


    On Mar 14, 9:56 pm, egla... at gmail.com wrote:
    Hello,
    I have a script that launches a sequence of other programs, some GUI,
    some console. I'd like the console programs to launch in their own
    console window, instead of all of them sharing the script's console.
    How do I do that?
    Would the subprocess module help here? It's available in Python 2.4
    onwards. I think it's supposed to be a one stop shop for all your
    external application launching needs (Python group, please correct me
    if I'm wrong here).
    -Greg
    Try to use "start"
    import os
    os.system("start cmd")
    Open a new console with a cmd shell in it.

    See start documentation herehttp://www.ss64.com/nt/start.html
    Or typing help start on the command line.

    It looks like 'start' might be exactly what I need. Thanks.

    Eli
  • Eglaser at Mar 15, 2007 at 12:25 pm
    Greg,

    Thanks for the tip. I will check out subprocess.

    Eli

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 15, '07 at 1:56a
activeMar 15, '07 at 12:26p
posts5
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase