<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><br><div class="gmail_quote"><div class="Ih2E3d">2008/9/12 Rohan Nicholls <span dir="ltr"><<a href="mailto:rohan.nicholls@googlemail.com" target="_blank">rohan.nicholls@googlemail.com</a>></span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for this.<div class="Ih2E3d"><br>
<br>
I have looked into python-mode but it seems to require pymacs which<br>
seems a rather heavy dependency, and not one I am sure I want to<br>
embrace, especially as a quick glance at aptitude shows that the last<br>
python in the packaged version it supports is python2.3. How did you<br>
get it working? Install pymacs yourself?<br>
</div></blockquote><div><br>Actually, I just typed: "apt-get install pymacs"<br>It is a package from 10 Mar 2008, version 0.22-6build1. It replaces for example python2.3-pymacs. <br>I could not find out, why you think it supports only 2.3.<br>
I'm using it with Ubuntu hardy. It's the default pymacs package there...<br>(and the file is 549kB, so it's at least not a big dependency :-) <br><br><br>Cheers, <br><font color="#888888">Stefan<br></font></div>
<div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
At this point I think I will have a look at getting something workable<br>
going with the bare current emacs, so having py files around the place<br>
is not a problem (python.el uses this technique).<br>
<div><div></div><div></div></div></blockquote><div><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>
<br>
On Fri, Sep 12, 2008 at 3:08 PM, Stefan Schwarzburg<br>
<<a href="mailto:stefan.schwarzburg@googlemail.com" target="_blank">stefan.schwarzburg@googlemail.com</a>> wrote:<br>
> Hi<br>
><br>
> 2008/9/12 Rohan Nicholls <<a href="mailto:rohan.nicholls@googlemail.com" target="_blank">rohan.nicholls@googlemail.com</a>><br>
>><br>
>> Hi Stefan,<br>
>><br>
>> Can you post your settings? And are you using python-mode<br>
>> or the python.el that comes with emacs?<br>
><br>
> python-mode<br>
><br>
> Sure, my settings are these:<br>
><br>
> ;; Python-Mode<br>
> (require 'ipython)<br>
> ;; up and down the history:<br>
> (require 'comint)<br>
> (define-key comint-mode-map [(meta up)]<br>
> 'comint-previous-matching-input-from-input)<br>
> (define-key comint-mode-map [(meta down)]<br>
> 'comint-next-matching-input-from-input)<br>
> (define-key comint-mode-map [(control meta up)]<br>
> 'comint-next-input)<br>
> (define-key comint-mode-map [(control meta down)]<br>
> 'comint-previous-input)<br>
><br>
> ;; setup python mode<br>
> (setq auto-mode-alist ; trigger python mode automatically<br>
> (cons '("\\.py$" . python-mode) auto-mode-alist))<br>
> (autoload 'python-mode "python-mode" "Python editing mode." t)<br>
> ; add my customization<br>
> (add-hook 'python-mode-hook 'my-python-hook)<br>
> ; this gets called by outline to deteremine the level. Just use the length<br>
> of the whitespace<br>
> (defun py-outline-level ()<br>
> (let (buffer-invisibility-spec)<br>
> (save-excursion<br>
> (skip-chars-forward "\t ")<br>
> (current-column))))<br>
> ; this gets called after python mode is enabled<br>
> (defun my-python-hook ()<br>
> ; outline uses this regexp to find headers. I match lines with no indent<br>
> and indented "class"<br>
> ; and "def" lines.<br>
> (setq outline-regexp "[^ \t]\\|[ \t]*\\(def\\|class\\) ")<br>
> ; enable our level computation<br>
> (setq outline-level 'py-outline-level)<br>
> ; do not use their \C-c@ prefix, too hard to type. Note this overides some<br>
> python mode bindings<br>
> (setq outline-minor-mode-prefix "\C-c")<br>
> ; turn on outline mode<br>
> (outline-minor-mode t)<br>
> ; initially hide all but the headers<br>
> (hide-body)<br>
> ; I use CUA mode on the PC so I rebind these to make the more accessible<br>
> (local-set-key [?\C-\t] 'py-shift-region-right)<br>
> (local-set-key [?\C-\S-\t] 'py-shift-region-left)<br>
> ; make paren matches visible<br>
> (show-paren-mode 1)<br>
> )<br>
><br>
><br>
><br>
><br>
>><br>
>> Okay, so you have an even older version than I do, so I will<br>
>> have to assume you are using the old python-mode package.<br>
>><br>
>> Btw. just so everyone knows the python.el package has some<br>
>> nice features, including completion, but not with context.<br>
>><br>
>> So you could get completions for wx.richtext....<br>
>> And unfortunately the completion does not work when in the<br>
>> interpreter, which is really where you need it.<br>
>><br>
>> I am also using emacs-snapshot (23.x).<br>
>><br>
>> Thanks for the info. I will have to look into this more.<br>
><br>
> :-)<br>
><br>
> Cheers,<br>
> Stefan<br>
><br>
><br>
>><br>
>> Rohan<br>
>><br>
>> On Fri, Sep 12, 2008 at 9:08 AM, Stefan Schwarzburg<br>
>> <<a href="mailto:stefan.schwarzburg@googlemail.com" target="_blank">stefan.schwarzburg@googlemail.com</a>> wrote:<br>
>> > Hi Thomas, Hi Rohan,<br>
>> > I'm using ipython.el.<br>
>> > I can't remember where I got it from, but it has "$Revision: 2275 $" in<br>
>> > it,<br>
>> > if that helps.<br>
>> > I'm using emacs-snapshot-gtk "GNU Emacs <a href="http://23.0.60.1" target="_blank">23.0.60.1</a> (i486-pc-linux-gnu,<br>
>> > GTK+<br>
>> > Version 2.12.9) of 2008-05-06 on iridium, modified by Debian"<br>
>> ><br>
>> > ipython mode works well, although TAB completion is emacs like (new<br>
>> > buffer<br>
>> > with the possible completions).<br>
>> > And "obj<TAB>" completes to object (without asking, because its the only<br>
>> > possibility...)<br>
>> ><br>
>> > Cheers,<br>
>> > Stefan<br>
>> ><br>
>> ><br>
>> > 2008/9/12 Thomas Bach <<a href="mailto:bachth@uni-mainz.de" target="_blank">bachth@uni-mainz.de</a>><br>
>> >><br>
>> >> Rohan Nicholls wrote:<br>
>> >> > Hi all,<br>
>> >> Hi,<br>
>> >><br>
>> >> > I have just installed ipython from bzr, and have added ipython.el to<br>
>> >> > my<br>
>> >> > emacs<br>
>> >> > setup. It is giving me errors, so I thought I would ask if anyone<br>
>> >> > is<br>
>> >> > using<br>
>> >> > this library?<br>
>> >><br>
>> >> I tried so several days ago, it resulted in the following post to this<br>
>> >> list:<br>
>> >> ---[SNIP]---<br>
>> >> Hi,<br>
>> >><br>
>> >> I can't get the TAB-completion to work in ipython.el. I tried both,<br>
>> >> ipython.el delivered by the ipython-0.9b3-package and the current<br>
>> >> SVN-release.<br>
>> >> Starting ipython in emacs and inserting e.g. obj<TAB><br>
>> >> I get:<br>
>> >> In [2]: ...: obj<br>
>> >><br>
>> >> and the minibuffer says, that there is no completion for "obj" (what is<br>
>> >> obviously wrong).<br>
>> >> Pressing <TAB> once more i get.<br>
>> >> In [3]: ------------------------------------------------------------obj<br>
>> >><br>
>> >> I am using Emacs 22.2.1<br>
>> >><br>
>> >> Any suggestions?<br>
>> >><br>
>> >> Greets,<br>
>> >> ---[SNIP]---<br>
>> >><br>
>> >> I didn't get any answers. I didn't manage to contact the maintainer<br>
>> >> yet,<br>
>> >> but having this peace of software running smoothly would be a great<br>
>> >> thing.<br>
>> >><br>
>> >> What output do you get?<br>
>> >><br>
>> >> Greets,<br>
>> >> Thomas Bach.<br>
>> >><br>
>> >> _______________________________________________<br>
>> >> IPython-user mailing list<br>
>> >> <a href="mailto:IPython-user@scipy.org" target="_blank">IPython-user@scipy.org</a><br>
>> >> <a href="http://lists.ipython.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://lists.ipython.scipy.org/mailman/listinfo/ipython-user</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Institut für Astronomie und Astrophysik<br>
>> > Eberhard Karls Universität Tübingen<br>
>> > Sand 1 - D-72076 Tübingen<br>
>> > <a href="mailto:schwarz@astro.uni-tuebingen.de" target="_blank">schwarz@astro.uni-tuebingen.de</a><br>
>> > <a href="mailto:stefan.schwarzburg@googlemail.com" target="_blank">stefan.schwarzburg@googlemail.com</a><br>
>> ><br>
>> > Tel.: 07071/29-78605<br>
>> > -----------------------------------------------------------------------<br>
>> ><br>
>> > _______________________________________________<br>
>> > IPython-user mailing list<br>
>> > <a href="mailto:IPython-user@scipy.org" target="_blank">IPython-user@scipy.org</a><br>
>> > <a href="http://lists.ipython.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://lists.ipython.scipy.org/mailman/listinfo/ipython-user</a><br>
>> ><br>
>> ><br>
><br>
><br>
><br>
> --<br>
> Institut für Astronomie und Astrophysik<br>
> Eberhard Karls Universität Tübingen<br>
> Sand 1 - D-72076 Tübingen<br>
> <a href="mailto:schwarz@astro.uni-tuebingen.de" target="_blank">schwarz@astro.uni-tuebingen.de</a><br>
> <a href="mailto:stefan.schwarzburg@googlemail.com" target="_blank">stefan.schwarzburg@googlemail.com</a><br>
><br>
> Tel.: 07071/29-78605<br>
> -----------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> IPython-user mailing list<br>
> <a href="mailto:IPython-user@scipy.org" target="_blank">IPython-user@scipy.org</a><br>
> <a href="http://lists.ipython.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://lists.ipython.scipy.org/mailman/listinfo/ipython-user</a><br>
><br>
><br>
</div></div></blockquote></div></div></div><br><br clear="all"><br>-- <br><div class="Ih2E3d">Institut für Astronomie und Astrophysik <br>Eberhard Karls Universität Tübingen<br>Sand 1 - D-72076 Tübingen<br><a href="mailto:schwarz@astro.uni-tuebingen.de" target="_blank">schwarz@astro.uni-tuebingen.de</a><br>
<a href="mailto:stefan.schwarzburg@googlemail.com" target="_blank">stefan.schwarzburg@googlemail.com</a><br><br>Tel.: 07071/29-78605<br>-----------------------------------------------------------------------<br>
</div></div>
</div><br><br clear="all"><br>-- <br>Institut für Astronomie und Astrophysik <br>Eberhard Karls Universität Tübingen<br>Sand 1 - D-72076 Tübingen<br><a href="mailto:schwarz@astro.uni-tuebingen.de">schwarz@astro.uni-tuebingen.de</a><br>
<a href="mailto:stefan.schwarzburg@googlemail.com">stefan.schwarzburg@googlemail.com</a><br><br>Tel.: 07071/29-78605<br>-----------------------------------------------------------------------<br>
</div>