title: Emacs C-c C-c for python code
body: <p>I'm new to using emacs as an IDE to python.  I have pymode and Ropemacs active.  My understanding is that I should be able to highlight a region then use C-c C-c to send it to an interactive terminal.  Are there additional packages that I need to accomplish this?</p>
  
  <p>The error I'm getting for C-c C-c is:</p>
  
  <pre><code>Wrong type argument: integer-or-marker-p, nil
  </code></pre>
  
  <p>I saw also <a href="http://www.emacswiki.org/emacs/ProgrammingWithPythonDotEl" rel="nofollow">this link</a> had a statement on that, but that didn't look like my error.</p>
  
  <p><strong>Update answering Zack</strong></p>
  
  <p>To set that variable, I went into emacs scratch and did this:</p>
  
  <pre><code>(setq debug-on-error t)
  </code></pre>
  
  <p>Then <code>M-x eval-region</code></p>
  
  <p>(Is that the right way to set that to true?)</p>
  
  <p>Then this is what appeared in my debugger:</p>
  
  <pre><code>Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
    count-lines(1 nil)
    (save-restriction (widen) (count-lines (point-min) (or (and (eq start (line-beginning-position)) (not (eobp)) (1+ start)) start)))
    (let* ((windows-config (window-configuration-to-register 313465889)) (origline (save-restriction (widen) (count-lines (point-min) (or (and (eq start ...) (not ...) (1+ start)) start)))) (py-shell-name (or shell (py-choose-shell))) (py-exception-buffer (current-buffer)) (execute-directory (cond ((condition-case nil (progn (file-name-directory ...)) (error nil))) ((and py-use-current-dir-when-execute-p (buffer-file-name)) (file-name-directory (buffer-file-name))) ((and py-use-current-dir-when-execute-p py-fileless-buffer-use-default-directory-p) (expand-file-name default-directory)) ((stringp py-execute-directory) py-execute-directory) ((getenv "VIRTUAL_ENV")) (t (getenv "HOME")))) (py-buffer-name (or py-buffer-name (py-buffer-name-prepare))) (filename (and filename (expand-file-name filename))) (py-orig-buffer-or-file (or filename (current-buffer))) (proc (or proc (if py-dedicated-process-p (get-buffer-process (py-shell nil py-dedicated-process-p py-shell-name py-buffer-name t)) (or (and (boundp ...) (get-buffer-process py-buffer-name)) (get-buffer-process (py-shell nil py-dedicated-process-p py-shell-name ... t)))))) err-p) (set-buffer py-exception-buffer) (py-update-execute-directory proc py-buffer-name execute-directory) (cond (python-mode-v5-behavior-p (py-execute-python-mode-v5 start end)) (py-execute-no-temp-p (py-execute-ge24\.3 start end filename execute-directory)) ((or file (and (not (buffer-modified-p)) filename)) (py-execute-file-base proc filename nil py-buffer-name filename execute-directory)) (t (py-execute-buffer-finally start end execute-directory))))
    py-execute-base(nil nil nil "/home/mittenchops/gh/myscript.py" nil "/home/mittenchops/gh/myscript.py")
    (setq erg (py-execute-base nil nil nil file nil (or (and (boundp (quote py-orig-buffer-or-file)) py-orig-buffer-or-file) file)))
    (if (file-readable-p file) (setq erg (py-execute-base nil nil nil file nil (or (and (boundp (quote py-orig-buffer-or-file)) py-orig-buffer-or-file) file))) (message "%s not readable. %s" file "Do you have write permissions?"))
    (let (erg) (if (file-readable-p file) (setq erg (py-execute-base nil nil nil file nil (or (and (boundp (quote py-orig-buffer-or-file)) py-orig-buffer-or-file) file))) (message "%s not readable. %s" file "Do you have write permissions?")) erg)
    py-execute-file("/home/mittenchops/gh/myscript.py")
    (let* ((py-master-file (or py-master-file (py-fetch-py-master-file))) (file (if py-master-file (expand-file-name py-master-file) (buffer-file-name)))) (py-execute-file file))
    py-execute-buffer-base()
    (progn (write-file (buffer-file-name)) (py-execute-buffer-base))
    (if (y-or-n-p "Buffer changed, save first? ") (progn (write-file (buffer-file-name)) (py-execute-buffer-base)) (py-execute-region (point-min) (point-max)))
    (if (and py-prompt-on-changed-p (buffer-file-name) (interactive-p) (buffer-modified-p)) (if (y-or-n-p "Buffer changed, save first? ") (progn (write-file (buffer-file-name)) (py-execute-buffer-base)) (py-execute-region (point-min) (point-max))) (if (buffer-file-name) (py-execute-buffer-base) (py-execute-region (point-min) (point-max))))
    py-execute-buffer()
    call-interactively(py-execute-buffer nil nil)
  </code></pre>