[IPython-user] IPython in XEmacs now working on Windows
Pete Forman
pete.forman@westerngeco....
Tue Feb 6 11:56:09 CST 2007
Nicolas Pernetty <nicopernetty@yahoo.fr> writes:
> On Fri, 02 Feb 2007 15:22:23 +0000, Pete Forman
> <pete.forman@westerngeco.com> wrote :
>
>> [snip]
>>
>> These emacs variables set using customize
>>
>> py-python-command-args
>> ("-pylab" "-colors" "LightBG")
>> ipython-command
>> "d:/Program Files/Python25/Scripts/ipython.bat"
>
> I don't have to customize this particular variable : if you put
> your directory in your PATH environment var,
> ipytohn.el/python-mode.el will find your ipython by themselves !
I don't like having too many entries in PATH. ipython is the only
script that I use from that directory.
>> After starting XEmacs, enter this in *scratch*
>>
>> (require `ipython)
>>
>>
>>
>> There are a few niggles.
>>
>> 1) I failed putting (require `ipython) in ~/.xemacs/init.el (formerly
>> ~/.emacs). There was an error about py-shell-map being undefined.
>> Perhaps using an autoload might make things smoother.
>
> I don't have this problem, and neither have my co-workers.
> Can you try with a vanilla init.el ?
I tried starting xemacs -q which bypasses init.el. Entering (require
`ipython) in *scratch* now gives the error about py-shell-map. If
however I enter (setq ipython-command ...) first then all is well.
My guess is that you are doing a setq or similar before (require
`ipython) which is causing some py- stuff to load. In my case I
suspect that customize is provoking the load, so ipython fails in
init.el as that is too early. By the time I get to the *scratch*
buffer customize has done its thing.
I've now removed ipython-command from custom and moved it into
init.el. The relevant part of that is now two lines. Startup is now
painless.
(setq ipython-command "d:/Program Files/Python25/Scripts/ipython.bat")
(require `ipython)
> Thanks a lot for your help,
Thank you. XEmacs + IPython + pylab is a formidable combination.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pete.forman@westerngeco.com -./\.- the opinion of Schlumberger or
http://petef.port5.com -./\.- WesternGeco.
More information about the IPython-user
mailing list