Not sure if anybody will ever need this. I just found out because I did not accept that I can’t load my Subversion pre-commit hook as a module.
Of course it is actually quite simple:
import imp
hook = imp.load_source(“hook”, “pre-commit”)
It’s that easy. Now I can test the internal functions from ipython before letting it wreck our repository. [...]