Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > running windows 'start' cmd using spawnl

Reply
Thread Tools

running windows 'start' cmd using spawnl

 
 
Tor Erik
Guest
Posts: n/a
 
      08-23-2006
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
 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      08-23-2006
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!
http://www.yahoo.com.ar/respuestas

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      08-23-2006
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(command) could work.

</F>


 
Reply With Quote
 
Michel Claveau
Guest
Posts: n/a
 
      08-23-2006
Hi!

You can use (exemple) :

"cmd /cSTART notepad"

--
@-salutations

Michel Claveau


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[exec cmd for cmd in cmds] =?ISO-8859-1?Q?Sch=FCle_Daniel?= Python 3 03-08-2006 03:21 PM
Interpreter-like help in cmd.Cmd Sarir Khamsi Python 4 06-26-2005 06:57 PM
read input for cmd.Cmd from file Achim Domma (Procoders) Python 2 06-03-2005 08:32 AM
windows, spawnl, and sys.argv Jonathan Ellis Python 0 11-07-2004 04:26 AM
spawnv( ) or spawnl( ) do not launch a normal running process in Python 2.2.2? nushin Python 3 08-07-2003 10:39 PM



Advertisments