I think you can just load (require ?) a python module and not run it and it will execute the python code.
I don't think that this is exclusive to python either.