Autocompletion for Modules

5 views
Skip to first unread message

Suno Ano

unread,
Jul 7, 2010, 11:58:50 AM7/7/10
to DreamPie
Hi,

I wanted to know what the status about autocompletion for module names
is e.g. if I do "import mat<TAB>" it would be nice to have dreampie
show me "math" as the or one of possible completions.

Noam Yorav-Raphael

unread,
Jul 7, 2010, 12:14:56 PM7/7/10
to drea...@googlegroups.com
Hello,

Currently there's no module completion. I hope to work on it soon.

Noam

Suno Ano

unread,
Jul 7, 2010, 3:05:53 PM7/7/10
to DreamPie
I see, good to hear. I think what bpython does is amazing (it also
shows you what help() would show you in addition to the parameters
expected) e.g.

import math
math.ceil(<TAB>

gives you the docstring describing the semantics of ceil() in addition
to the possible formal parameters ceil() takes.

Noam Yorav-Raphael

unread,
Jul 7, 2010, 5:49:58 PM7/7/10
to drea...@googlegroups.com
This I actually already implemented - in the version in the bzr
repository, the window shows the entire documentation and source code,
and can be scrolled.

I hope to release version 1.1 soon, and it will be there.

Suno Ano

unread,
Jul 8, 2010, 8:03:25 AM7/8/10
to DreamPie
Great to hear that! I am on Debian and simply haven't pulled from
upstream yet but just went with the .deb from unstable

sa@wks:~$ rmadison dreampie
dreampie | 1.0.3-1 | testing | source, all
dreampie | 1.0.3-2 | unstable | source, all
sa@wks:~$

Noam Yorav-Raphael

unread,
Jul 8, 2010, 10:11:41 AM7/8/10
to drea...@googlegroups.com
Sure. If you like to try the repository, it's very simple - just run
bzr co lp:dreampie
and run 'dreampie' from the created directory.

Suno Ano

unread,
Jul 8, 2010, 10:56:30 AM7/8/10
to DreamPie
Yeah, sure, I just did this and made it so that I get my daily pull
from upstream automatically i.e. Dreampie just got another tester for
its bleeding edge code :-)

Noam Yorav-Raphael

unread,
Jul 8, 2010, 11:04:06 AM7/8/10
to drea...@googlegroups.com
Cool! If you can play with the enhanced function documentation and
auto-parens (type "execfile"<space> and see what happens) I'll be very
grateful.

Suno Ano

unread,
Jul 8, 2010, 3:54:06 PM7/8/10
to drea...@googlegroups.com

Noam> Cool! If you can play with the enhanced function documentation
Noam> and auto-parens (type "execfile"<space> and see what happens)
Noam> I'll be very grateful.

lovely! I tried execfile<SPC> and it expanded to execfile("") and then
further on it provides possible paths suggestions as you type along.

I also saw that module completion landed. I pulled from HEAD and tried
it right away ... works like charm.

Noam Yorav-Raphael

unread,
Jul 8, 2010, 5:14:51 PM7/8/10
to drea...@googlegroups.com
It's really nice to hear that. If you find a bug, tell me.

Suno Ano

unread,
Jul 10, 2010, 4:30:12 PM7/10/10
to drea...@googlegroups.com

Noam> It's really nice to hear that. If you find a bug, tell me.

1)
sure, will do.

2)
One thing I would find an improvement would be if module completion
would work as it does in bpython:

- TAB key lets you move trough the possible choices of available
modules (instead of having to use the up/down arrow keys)
- available modules would not just be shown as a scrollable vertical
list but as it is done by bpython i.e. as columns side by side so
that one would see everything at a glance without having to scroll up
and down

I say this because I think that with special regards to all kinds of
shells (whether OS (bash, krsh, etc.) or programming languages ones),
the one that is the fastest/easiest to use will be the one that is most
users choice.

Noam Yorav-Raphael

unread,
Jul 10, 2010, 4:57:58 PM7/10/10
to drea...@googlegroups.com
Thanks for your comments!

On Sat, Jul 10, 2010 at 11:30 PM, Suno Ano <suno...@sunoano.org> wrote:
>
>  Noam> It's really nice to hear that. If you find a bug, tell me.
>
> 1)
> sure, will do.
>
> 2)
> One thing I would find an improvement would be if module completion
> would work as it does in bpython:
>
>  - TAB key lets you move trough the possible choices of available
>   modules (instead of having to use the up/down arrow keys)

I plan to leave the tab key do what it does: complete your prefix. I
think that using the arrow keys is a good way to navigate.

>  - available modules would not just be shown as a scrollable vertical
>   list but as it is done by bpython i.e. as columns side by side so
>   that one would see everything at a glance without having to scroll up
>   and down

I see the advantage of this, but I don't think it can be done with
GTK. Eclipse and Visual Studio use a vertical list, so I don't think
the need of improvement is very urgent.

Reply all
Reply to author
Forward
0 new messages