Updated, so that the Python code generated doesn't crash immediately.
Works well enough to power: http://sfgp.cemetech.net/?page=komodots

Error handling seems unstable, and I suspect the Python code must be
rewritten eventually, but it seems good enough for now. MUCH better
than what was before.