Updated the python launcher code to be a little simpler and reuse more code.