       (setq py-which-shell py-python-command
 	    ppy-which-shell ppy-python-command
 	    pyd-which-shell pyd-python-command
+	    pyo-which-shell pyo-python-command
 	    py-which-args py-python-command-args
 	    ppy-which-args ppy-python-command-args
 	    pyd-which-args pyd-python-command-args
+	    pyo-which-args pyo-python-command-args
 	    py-which-bufname "Python"
 	    msg "CPython"
 	    mode-name "Python"))

			       ))))
    (switch-to-buffer ;; -other-window
     (apply 'make-comint py-which-bufname pyd-which-shell nil args))
    (make-local-variable 'comint-prompt-regexp)
    (setq comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) ")
    (add-hook 'comint-output-filter-functions

(defvar py-which-shell nil)
(defvar ppy-which-shell nil)
(defvar pyd-which-shell nil)
(defvar pyo-which-shell nil)
(defvar py-which-args  py-python-command-args)
(defvar ppy-which-args  ppy-python-command-args)
(defvar pyd-which-args  pyd-python-command-args)
(defvar pyo-which-args  pyo-python-command-args)
(defvar py-which-bufname "Python")
(make-variable-buffer-local 'py-which-shell)
(make-variable-buffer-local 'ppy-which-shell)
(make-variable-buffer-local 'pyd-which-shell)
(make-variable-buffer-local 'pyo-which-shell)
(make-variable-buffer-local 'py-which-args)
(make-variable-buffer-local 'ppy-which-args)
(make-variable-buffer-local 'pyd-which-args)
(make-variable-buffer-local 'pyo-which-args)
(make-variable-buffer-local 'py-which-bufname)
(make-variable-buffer-local 'ppy-which-bufname)
(make-variable-buffer-local 'pyd-which-bufname)
(make-variable-buffer-local 'pyo-which-bufname)

(defun py-toggle-shells (arg)
  "Toggles between the CPython and JPython shells.
