Øyvind wrote:
> Hello.
> 
> I need to run a program
> (http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default.asp)
> thru Python. It is normally run such as "uptime AUTO-SRV-001 /s
> /d:04/01/2005" in the command prompt. Is it possible to run a already
> compiled exe file in Python and thereafter get the result out? What
> module/command should I look for to run another program? Googling have
> only given me results about how to run Python..

Try the subprocess module, something like
results = subprocess.Popen('uptime AUTO-SRV-001 /s /d:04/01/2005', 
stdout=subprocess.PIPE).communicate()[0]

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to