Made python-mode.el config working, switched to when instead of if blocks.