The default python version on mac osx snow leopard is python 2.6.1. I am learning python 3, so I have to change the interpreter. I have changed the setting in preference, so that it points to /Library/framework/python.framework/version/3.2/bin/python3.2
. I believe that is where my 3.2 interpreter is installed.
When I restart Emacs, everything works fine. When I start the interpreter, it says python 3.2:
Python 3.2 (r32:88452, Feb 20 2011, 11:12:31)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
However, when I ask Emacs to execute a buffer, this message shows up:
execfile(r'/var/folders/yV/yVXYrzONGSaZeoBmB-mdkE+++TI/-Tmp-/python-2180L5f.py') # PYTHON-MODE
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'execfile' is not defined
I don't know how to fix it. It has nothing to do with my code though, because this message shows up even when I try to execute:
print ("Hello World")