473,503 Members | 3,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to run an external program...

ash
hi,
i want to know is there a way to run/control an external program form
within a python program?
thanks in advance for any support.

Dec 1 '05 #1
5 1548
hi,

What do you need by "control" ?

look at os.system/execv/popen ...;

Regards,

Philippe
On Thu, 01 Dec 2005 11:57:03 -0800, ash wrote:
hi,
i want to know is there a way to run/control an external program form
within a python program?
thanks in advance for any support.


Dec 1 '05 #2
In addition to what Philippe suggested, take a look at the
subprocess module as well (if you are on Python 2.4 or
greater).

-Larry Bates

ash wrote:
hi,
i want to know is there a way to run/control an external program form
within a python program?
thanks in advance for any support.

Dec 1 '05 #3
Larry Bates wrote:
In addition to what Philippe suggested, take a look at the
subprocess module as well (if you are on Python 2.4 or
greater).


footnote: the subprocess module is available for 2.2 and 2.3 as well.
a pure-python version (for unix and compatibles) can be found here:

http://www.lysator.liu.se/~astrand/popen5/

windows binaries here:

http://effbot.org/downloads/#subprocess

</F>

Dec 1 '05 #4
ash
Thanks for Philippe, Larry and Fredrik for the help.
the subprocess module did the trick.

Dec 1 '05 #5

ash wrote:
hi,
i want to know is there a way to run/control an external program form
within a python program?
thanks in advance for any


Have you tried os.system()?

Dec 2 '05 #6

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

Similar topics

47
3798
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
8
32647
by: Greg Fierro | last post by:
I would appreciate any help from anyone with the following: I have an external program (window32 based) that I am executing with the VBA SHELL command. This program produces a text file which I...
1
4966
by: Laszlo | last post by:
Hi all, As a novice I installed PostgreSQL 7.2.1 on Win32 and works, Borland C++Builder Enterprise Suite 5.0 (build 12.34) what works too. I decided to combine these two programs and develop a...
4
20109
by: My SQL | last post by:
Hi Can I trigger an external program to run when a new record is added to the mysql table? The external program is in C and instead of scanning the table continuously for new insertions, it...
5
3612
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
2
1743
by: holysmokes99 | last post by:
I am developing a component in .Net 1.1, and want to debug it using the "start external program" of the debugger in the IDE. The program I want to start references both 1.1 and 2.0 components. The...
2
5300
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
2381
by: lpcarignan | last post by:
Hi all, Right now, I'm debugging a C# library by starting an external application. To do this, I go in the project settings of the C# project, go in the Debug section and check the radio button...
0
1652
by: Chico Jayanthan | last post by:
Hi, I call an external windows program (.exe) from a python script. Something like os.system('test.exe'). I want to set a timeout for the external windows program to return. If no results are...
2
2706
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.