help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs uses an old version of python


From: Richard Riley
Subject: Re: emacs uses an old version of python
Date: Mon, 01 Dec 2008 09:26:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> John Seales <praxbaffle@hotmail.com> writes:
>
>> GNU emacs 22.1.1
>> on an Intel MacBook
>>
>> I've updated to Python 2.6, but emacs still is using 2.3. This is a problem 
>> because I need to use the newer features of the language. Looking in my 
>> /usr/bin/ directory, I see that 'python2.3' and 'pythonw2.3' are in there, 
>> along with just plain 'python'. Using sudo, I copied 'python2.6' and 
>> 'pythonw2.6' into /usr/bin, but still emacs calls the old version. 
>> Interestingly, the terminal application correctly uses the new version of 
>> python when I run it from there.
>>
>> I'm guessing I may need to move more files around and/or change my .emacs 
>> file. But how?
>
> Hi!
> with python-mode i use:
>
> ,----[ C-h v py-python-command RET ]
> | py-python-command is a variable defined in `python-mode.el'.
> | Its value is "ipython"
> | 
> | Documentation:
> | *Shell command used to start Python interpreter.
> | 
> | You can customize this variable.
> | 
> | ===*===*===*===*===*===*===*===*===*===*===
> `----
>
> for me it's ipython but it can be python2.5 or 6 ...

Alternatively leave it as python and have this in your ~/.python.py

,----
| import IPython,os
| 
| if os.path.isfile('.pythonrc.py'):
|     execfile('.pythonrc.py')
| 
| IPython.Shell.IPShell().mainloop(sys_exit=1)
`----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]