While looking into a different issue I had a realization: pretty much the only thing in python-shell that is actually specific to python is the parseError function. Theoretically you can even override that and point pythonPath to a different interpreter!
I should probably make this as a seperate package that python-shell has a dependency upon, so others can extend it to their languages as well.