Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load current buffer into Python interpreter in Emacs?

Tags:

python

emacs

I'm trying to use emacs to edit and run python programs (emacs23 and python 2.6 on Ubuntu 10.10).

  • I read a file into Emacs (C-x -C-f)
  • I start the interperter (Menu Python - Start interpreter, I haven't found the keyboard shortcut for this yet)
  • Emacs split the frame in two windows
  • I place the cursor in the python file (C-x o)

Now I want to run the Python code in the upper window in the Python interpreter in the lower window. Other places have suggested:

  • C-c C-c, but that does nothing
  • C-c !, but emacs says that that command is undefined

I have installed ropemacs (sudo apt-get install python-ropemacs) but that didn't change anything.

like image 919
BioGeek Avatar asked Dec 29 '10 15:12

BioGeek


1 Answers

You may want to hit "C-c C-z" (switch to interpreter) to see the results of and buffers or regions you evaluated.

like image 86
sleepynate Avatar answered Nov 08 '22 07:11

sleepynate