I use Pymacs to load Ropemacs and Rope with the following lines in my .emacs as described here.
(autoload 'pymacs-load "pymacs" nil t)
(pymacs-load "ropemacs" "rope-")
It however slows down the startup of Emacs significantly as it takes a while to load Ropemacs.
I tried the following line instead but that loads Ropemacs everytime Python file is opened...
(add-hook 'python-mode-hook (lambda () (pymacs-load "ropemacs" "rope-")))
Is there a way to perform the pymacs-load when opening a Python file but only if ropemacs and rope aren't loaded yet?