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

Fredrik Lundh fredrik at effbot.org
Thu Jan 18 17:30:13 EST 2001


"James" wrote:
> 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?

import os
os.system("command")

Other options include os.popen, os.spawn, etc.  See the
library reference for more info.

Cheers /F





More information about the Python-list mailing list