 comint believe the user typed this string so that
 `kill-output-from-shell' does The Right Thing."
   (interactive)
-  (let ((curbuf (current-buffer))
-	(procbuf (process-buffer proc))
+  (let ((procbuf (process-buffer proc))
 	(cmd (format "from direct.showbase import Finder; Finder.rebindClass(__builtins__.globals(), r'%s')\n" filename))
 	)
 

(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)

      (py-redefine-class-file proc file)
     ))))

(defun py-redefine-class-region (start end &optional async)
  (interactive "r\nP")
  (or (< start end)
      (error "Region is empty"))
  ;; run through all the Python processes and redefine the class
  (save-current-buffer
    (let ((curbuf (current-buffer)))
      (for-all-py-procs (lambda (proc)
			  (set-buffer curbuf)
			  (py-redefine-class-region-for-proc start end proc)))
      )
    )
  )

;; Python subprocess utilities and filters
(defun py-redefine-class-file (proc filename)
