Autocompletion for Modules

已查看 4 次
跳至第一个未读帖子

Suno Ano

未读,
2010年7月7日 11:58:502010/7/7
收件人 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

未读,
2010年7月7日 12:14:562010/7/7
收件人 drea...@googlegroups.com
Hello,

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

Noam

Suno Ano

未读,
2010年7月7日 15:05:532010/7/7
收件人 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

未读,
2010年7月7日 17:49:582010/7/7
收件人 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

未读,
2010年7月8日 08:03:252010/7/8
收件人 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

未读,
2010年7月8日 10:11:412010/7/8
收件人 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

未读,
2010年7月8日 10:56:302010/7/8
收件人 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

未读,
2010年7月8日 11:04:062010/7/8
收件人 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

未读,
2010年7月8日 15:54:062010/7/8
收件人 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

未读,
2010年7月8日 17:14:512010/7/8
收件人 drea...@googlegroups.com
It's really nice to hear that. If you find a bug, tell me.

Suno Ano

未读,
2010年7月10日 16:30:122010/7/10
收件人 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

未读,
2010年7月10日 16:57:582010/7/10
收件人 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.

回复全部
回复作者
转发
0 个新帖子