Using python to call .bat files-- possible??

Nils Hensel nils.hensel at online.de
Thu Jan 18 17:29:36 EST 2001


That's not too difficult:

import os
return_code = os.system ('c:\\your\\batch\\file.bat')

If you need to get the output of any of these programs take a look at
os.popen (filename)

Nils

"James" <LCKJAM003 at mail.uct.ac.za> schrieb im Newsbeitrag
news:3A676D38.5D972E12 at mail.uct.ac.za...
> hi all
>
> am hoping to use a python script to control a process that at the moment
> is run by a set of 10 windows batch files.
>
> was hoping i could write a script that would automate my process and let
> me iterate it until the result was with tolerance...
>
> is it possible to call other external programs from python?
>
> thanks ( in advance, hopefully)
> james
>





More information about the Python-list mailing list