 ;; change this, you probably have to change `py-current-defun' as
 ;; well.  This is only used by `py-current-defun' to find the name for
 ;; add-log.el.
-(defvar py-defun-start-re
+(defconst py-defun-start-re
   "^\\([ \t]*\\)def[ \t]+\\([a-zA-Z_0-9]+\\)\\|\\(^[a-zA-Z_0-9]+\\)[ \t]*=")
 
 ;; Regexp for finding a class name.  If you change this, you probably
 ;; have to change `py-current-defun' as well.  This is only used by
 ;; `py-current-defun' to find the name for add-log.el.
-(defvar py-class-start-re "^class[ \t]*\\([a-zA-Z_0-9]+\\)")
+(defconst py-class-start-re "^class[ \t]*\\([a-zA-Z_0-9]+\\)")
+
+;; Regexp that describes tracebacks
+(defconst py-traceback-line-re
+  "[ \t]+File \"\\([^\"]+\\)\", line \\([0-9]+\\), in ")
 
 
 
      (if (not py-file-queue)
	  (py-execute-file proc file)
	(message "File %s queued for execution" file))
      (push file py-file-queue))
     (t
      ;; otherwise either run it synchronously in a subprocess
      (shell-command-on-region start end py-python-command outbuf)
      ))))

;; Code execution command

    (mapcar 'delete-file py-file-queue)
    (setq py-file-queue nil)
    (message "%d pending files de-queued." n)))

(defun py-execute-region (start end &optional async)
  "Execute the the region in a Python interpreter.
