I'm still new to python and need some help writing a program. I need to write one that runs a *.exe and then checks some timings in it. There are 3 numbers ranging from 0<1000 that are hidden in the *.exe(app.exe). If the script runs the app.exe and then runs the numbers 0-1000, when the right number is reached, the app.exe slows and then moves on to the next series of numbers. This sequence is repeated 3 times until all 3 numbers are revealed.
I'm thinking something like this?

point to app.exe
run app.exe
check times between numbers:
123 (.08 secs)
444 ( 1.2 secs)
369 ( 1.8 secs)

So I'm trying to start with this:

import os,sys 
pyPath=r"C:\python25\python.exe" 
appPath= r"C:\python25\app.exe" 
os.spawnv(P_NOWAIT,pyPath,["python",appPath])

When I run that, I get a NameError: name 'MZP' is not defined. I'm not sure where that comes from. If I switch pyPath & appPath in os.spawnv, the app.exe runs but I don't think that's the right placement for those. Any suggestions on other functions I need to write the whole program?


Wed Feb 07, 2007 8:13 am[IMG]http://python-forum.org/py/templates/ca_aphrodite/images/lang_english/icon_profile.gif[/IMG] [IMG]http://python-forum.org/py/templates/ca_aphrodite/images/lang_english/icon_pm.gif[/IMG]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.