      ;; always run the code in its own asynchronous subprocess
      (async
       (let* ((buf (generate-new-buffer-name py-output-buffer)))
-	(start-process "Python" buf py-python-command "-u" file)
+	(start-process py-which-bufname buf py-which-shell "-u" file)
 	(pop-to-buffer buf)
 	(py-postprocess-output-buffer buf)
 	))

  (interactive "r\nP")
  (or (< start end)
      (error "Region is empty"))
  (let* ((proc (get-process "Python"))
	 (temp (if (memq 'broken-temp-names py-emacs-features)
		   (let
		       ((sn py-serial-number)

      (setq py-exception-buffer (cons file (current-buffer))))
     (t
      ;; otherwise either run it synchronously in a subprocess
      (shell-command-on-region start end py-which-shell py-output-buffer)
      ;; shell-command-on-region kills the output buffer if it never
      ;; existed and there's no output from the command
      (if (not (get-buffer py-output-buffer))
