[Tutor] Run a cmd program
Adam Bark
adam.jtm30 at gmail.com
Tue Aug 9 14:35:53 CEST 2005
>>> import commands
>>> commands.getoutput("uptime AUTO-SRV-001 /s /d:04/01/2005")
that should do it
On 8/9/05, Øyvind <python at kapitalisten.no> 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..
>
> Thanks in advance.
>
> --
> This email has been scanned for viruses & spam by Decna as - www.decna.no<http://www.decna.no>
> Denne e-posten er sjekket for virus & spam av Decna as - www.decna.no<http://www.decna.no>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050809/23f7e347/attachment.htm
More information about the Tutor
mailing list