 
 See the `\\[py-shell]' docs for additional warnings."
   (interactive "r")
-  (or (< start end) (error "Region is empty"))
+  (or (< start end)
+      (error "Region is empty"))
   (let ((pyproc (get-process "Python"))
 	fname)
     (if (null pyproc)
-	(shell-command-on-region start end py-python-command)
+	(let ((outbuf "*Python Output*"))
+	  (shell-command-on-region start end py-python-command outbuf)
+	  (save-excursion
+	    (set-buffer outbuf)
+	    ;; TBD: ???
+	    (goto-char (point-max))))
       ;; else feed it thru a temp file
       (setq fname (py-make-temp-name))
       (write-region start end fname nil 'no-msg)

  (let ((here (point)))
    (back-to-indentation)
    (prog1
	(looking-at "\\(return\\|raise\\|break\\|continue\\|pass\\)\\>")
      (goto-char here))))

;; go to point right beyond final line of block begun by the current

  :type '(choice
	  (const :tag "Skip all comment lines (fast)" nil)
	  (const :tag "Single # `sets' indentation for next line" t)
	  (const :tag "Single # `sets' indentation except at column zero"
		 other)
	  )
  :group 'python)

