473,288 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

spawn process in a new console window

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

Mar 15 '07 #1
4 4676
On Mar 14, 9:56 pm, egla...@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

Mar 15 '07 #2
gr********@gmail.com a écrit :
On Mar 14, 9:56 pm, egla...@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.
Mar 15 '07 #3


Greg,

Thanks for the tip. I will check out subprocess.

Eli

Mar 15 '07 #4
On Mar 15, 5:12 am, Laurent Pointal <laurent.poin...@limsi.frwrote:
gregpin...@gmail.com a écrit :
On Mar 14, 9:56 pm, egla...@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

Mar 15 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jason Callas | last post by:
I am trying to figure out how to create a console window but cannot figure out how to do this. I know it can be done since the C# and VB console template projects do this but I see no code on how...
2
by: Ram | last post by:
I have a console application that brings up a dialog if invoked with no command line parameters. If I double click on my application a console window is briefly displayed before the dialog appears...
2
by: Bumbrlik | last post by:
When I spawn a console application from a another application of mine using _spawnl(_P_NOWAIT, my_program, ......), it opens a new console window but when it is finished the window is...
5
by: thinktwice | last post by:
<package> <job id="js"> <script language="JScript"> var WshNetwork = WScript.CreateObject("WScript.Network"); var oDrives = WshNetwork.EnumNetworkDrives(); var oPrinters =...
5
by: Scott | last post by:
Hi everyone, I have a c# console app that when run through an autorun.inf file, launches a web page from the CD. It works just fine but I would like the console window minimized on startup....
10
by: Stephany Young | last post by:
When one uses the System.Diagnostics.Process.Start method to launch a common or garden Console application, one can set the WindowStyle property of the StartInfo object to ProcessWindowStyle.Hidden...
0
by: jbenezech | last post by:
Hi all , I have a perl/java app running under Win32. The application consists of a perl service (Win32::Daemon) and of java classes. The perl service calls every xx hours java classes to perform...
3
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
Good Afternoon: I have two questions I was hoping someone can help me with. 1. I've created a app that creates a xml file; the project was constructed as a console window. I want to know is...
1
by: =?Utf-8?B?TFQgS2hvbw==?= | last post by:
Hello everybody, I had a window service program that invokes command scripts from bat/cmd files using the C function "system", compiled using Visual Studio 2005. When the scripts are invoked in...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.