running windows 'start' cmd using spawnl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tor Erik

    #1

    running windows 'start' cmd using spawnl

    Hi,

    I need to start a program in a new cmd-window. To do this I need to
    execute: start [command]
    With os.system this is straight-forward.
    But I need to do it with spawnl and P_NOWAIT. I.e, asynchronously.
    The problem is that I need to know the path where start resides,
    which I'm unable to find.

    Does anyone know where this command is located, or an alternative way of
    doing what I want?

    regards
  • Gabriel Genellina

    #2
    Re: running windows 'start' cmd using spawnl

    At Wednesday 23/8/2006 14:22, Tor Erik wrote:
    >I need to start a program in a new cmd-window. To do this I need to
    >execute: start [command]
    >With os.system this is straight-forward.
    >But I need to do it with spawnl and P_NOWAIT. I.e, asynchronously.
    >The problem is that I need to know the path where start resides,
    >which I'm unable to find.
    On Windows NT, XP, 2003 and others, there is no "start.exe"
    executable; it's an internal command. It only exists on 95, 98, maybe ME.
    Try the subprocess module.


    Gabriel Genellina
    Softlab SRL





    _______________ _______________ _______________ _____
    Preguntá. Respondé. Descubrí.
    Todo lo que querías saber, y lo que ni imaginabas,
    está en Yahoo! Respuestas (Beta).
    ¡Probalo ya!


    Comment

    • Fredrik Lundh

      #3
      Re: running windows 'start' cmd using spawnl

      Tor Erik wrote:
      I need to start a program in a new cmd-window. To do this I need to
      execute: start [command]
      With os.system this is straight-forward.
      But I need to do it with spawnl and P_NOWAIT. I.e, asynchronously.
      The problem is that I need to know the path where start resides,
      which I'm unable to find.
      os.startfile(co mmand) could work.

      </F>


      Comment

      • Michel Claveau

        #4
        Re: running windows 'start' cmd using spawnl

        Hi!

        You can use (exemple) :

        "cmd /cSTART notepad"

        --
        @-salutations

        Michel Claveau


        Comment

        Working...