This works pretty well for systems with a shell (although you still need to deal with shell portability issues), but is problematic for Windows.

It's not particularly difficult to run Python scripts slave-side right now, either. Usually you'll use a FileDownload? to send the script, and then a ShellCommand? to invoke Python. That requires knowing with Python is installed, though, which varies from platform to platform. But the Buildbot-slave code is running in the python interpreter and knows exactly what its pathname is (sys.executable)!

So this is proposing adding a slave-side command that can take a string and execute it in a freshly-spawned Python interpreter on the slave.

FYI: I had that working at some point by simply using base64 to encode the Python-code string on the master and decode it on the slave again. That pretty much worked on every platform I was targeting at that time (Windows, OSX, Linux).