Calling GNU/make from a Python Script
fredrik at pythonware.com
Mon Oct 30 16:05:03 CET 2006
Efrat Regev wrote:
> 1. The script is not in the directory of the makefile, and changing the
> locations of either is not an option. Consequently, the makefile fails,
> since it can't find the targets/dependencies.
build_dir = "path/to/makefile"
cwd = os.getcwd() # get current directory
> 2. After searching around, it seems that os.system(..) should be avoided
> if there's an alternative. Is there one in this case?
"make" is not an operating system service, no.
More information about the Python-list