473,387 Members | 1,440 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,387 software developers and data experts.

executing non-Python conde

I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

Jul 18 '05 #1
3 1296
Earl Eiland wrote:
I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

os.system() or win32process.CreateProcess() depending on how much
control you want and/or if it is a Windows GUI .exe.

Larry Bates
Jul 18 '05 #2
So where do I find win32process.
It's not a builtin (at least import win32process fails)
A search of python.org fails.
A search of sourceforge fails.
A google search brings up lots of stuff, but I didn't find the module.

Earl Eiland

On Fri, 2005-03-11 at 09:02, Larry Bates wrote:
Earl Eiland wrote:
I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

os.system() or win32process.CreateProcess() depending on how much
control you want and/or if it is a Windows GUI .exe.

Larry Bates


Jul 18 '05 #3
Earl Eiland wrote:
So where do I find win32process.
It's not a builtin (at least import win32process fails)
A search of python.org fails.
A search of sourceforge fails.
A google search brings up lots of stuff, but I didn't find the module.

Earl Eiland

[...]

http://starship.python.net/crew/mhammond/

google-is-your-friend-ly y'rs - steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #4

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

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
10
by: Heiko Pliefke | last post by:
Hi NG! I wrote a stored procedure which at first deletes 100.000 rows and then inserts 100.000 new rows. There is a huge difference between executing this SP in the query-analyzer (runtime...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
0
by: Ian Warford | last post by:
Hi, I have a problem with a PL/PerlU function trying to execute an external perl script. The script is suid to a non-root user and I am executing it in the PL/PerlU function as so : $rc =...
3
by: Paul Reddin | last post by:
Hi, We have a whole set of Views we would like to structure a follows, but they don't seem to optimise in the way we would like: e.g CREATE VIEW1 (col1,col2,col3....) as (
2
by: joe1977 | last post by:
Win2k3, PHP 5, Apache 2, Acrobat 7 when I go to my server, pull out cmd.exe and type as follows: "c:\Program Files\Adobe\Acrobat 7.0\\Reader\AcroRd32.exe" /t "c:\Program Files\Adobe\Acrobat...
8
by: lovecreatesbea... | last post by:
K&R 2, sec 2.4 says: If the variable in question is not automatic, the initialization is done once only, conceptually before the program starts executing, ... . "Non-automatic variables are...
5
by: reycri | last post by:
Hi, I need to be able to do this: var func = new Function("var me = <selfRef>; alert(me.params);"); func.params = "This is a test parameter"; window.setTimeout(func, 500); Basically, I...
1
by: bill | last post by:
Here's a question about getting the most out of the interface when executing SQL in the interactive window of M In TOAD (a popular front end for Oracle by Quest Software), the equivalent of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.