 (require 'shell)
 (require 'executable)
 (require 'ansi-color)
+;; XXX load python-mode, so that we can screw around with its variables
+;; this has the disadvantage that python-mode is loaded even if no
+;; python-file is ever edited etc. but it means that `py-shell' works
+;; without loading a python-file first. Obviously screwing around with
+;; python-mode's variables like this is a mess, but well.
+(require 'python-mode)
 
 (defcustom ipython-command "ipython"
   "*Shell command used to start ipython."

(if (not (executable-find ipython-command))
    (message (format "Can't find executable %s - ipython.el *NOT* activated!!!"
                     ipython-command))
    ;; XXX load python-mode, so that we can screw around with its variables
    ;; this has the disadvantage that python-mode is loaded even if no
    ;; python-file is ever edited etc. but it means that `py-shell' works
    ;; without loading a python-file first. Obviously screwing around with
    ;; python-mode's variables like this is a mess, but well.
    (require 'python-mode)
    ;; turn on ansi colors for ipython and activate completion
    (defun ipython-shell-hook ()
      ;; the following is to synchronize dir-changes

;; always in ``pylab`` mode with hardcoded light-background colors, you can
;; use::
;;
;; (setq-default py-python-command-args '("--pylab" "--colors=LightBG"))
;;
;;
;; NOTE: This mode is currently somewhat alpha and although I hope that it
