resolving hang problem in python-mode