clone from https://launchpad.net/python-mode