Using Python to automate builds

Kosta kosta.koeman at
Tue Aug 4 21:13:10 CEST 2009

I am a Python newbie, tasked with automating (researching) building
Windows drivers using the WDK build environment.  I've been looking
into Python for this (instead of writing a bunch of batch files).

What I would like to do, is to open a cmd window, and start a Python
script.  This script would then (based upon input arguments), build
different flavors of the driver (fre, chk, x86, x64) and do some post
processing (create cat files, sign, etc.).

I was hoping to take advantage as much as possible of exisiting
infrastructure from the WDK.  I am able to call setenv.bat and provide
all the input parameters.  One of the things setenv.bat does is change
the path environment variable.  However, this is not captured by
Python.  I could duplicate the functionality, but I'd rather not.  Is
there a way to capture all enviroment variable changes being made by a
batch file from Python?


More information about the Python-list mailing list