running windows 'start' cmd using spawnl

T

Tor Erik

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
 
G

Gabriel Genellina

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!
http://www.yahoo.com.ar/respuestas
 
F

Fredrik Lundh

Tor said:
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(command) could work.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top