some tweaks to python modes