Python is not a pretty good language in defining a set of commands to run. Bash is. But Bash does not run naively on Windows.
Background: I am trying to build a set of programs - with established dependency relationships between them - on mac/win/linux. Something like macports but should work on all the three platforms listed.
This begets the necessary to have a shell-like language that can be used to define the command sequence to run for building/patching/etc.. a particular program, for instance:
post-destroot {
xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
delete ${destroot}${prefix}/bin/ctags
delete ${destroot}${prefix}/share/man/man1/ctags.1
if {[variant_isset carbon]} {
global version
delete ${destroot}${prefix}/bin/emacs ${destroot}${prefix}/bin/emacs-${version}
}
}
The above is from the emacs Portfile in macports. Note the use of variables, conditionals, functions .. besides specifying a simple list of commands to execute in that order.
Although the syntax is not Python, the actual execution semantics has to be deferred to Python using subprocess or whatever. In short, I should be able to 'run' such a script .. but for each command a specified hook function gets called that actually runs any command passed as argument. I hope you get the idea.