Hacking on registering external commands implemented in python