[Python-3000] Minor addition to Python interactive shell...

Brett Cannon brett at python.org
Sat Aug 23 23:26:40 CEST 2008


On Sat, Aug 23, 2008 at 2:10 PM, Abdallah El Guindy
<abdallah.elguindy at gmail.com> wrote:
> I believe there must be a way... Maybe by creating an index file for each
> module. I'm not sure, but I think the number of packages on apt-get is much
> more than the number of python built-in modules (obviously I don't know
> their number), yet it is doable with the case of apt-get.
>

I think Ruby has a similar tool; someone once showed me how in Ruby
you can just start to type the function or class name and it lists all
possible matches, and then when you make a choice it shows the docs. I
am sure it was done based on an index. And doctools probably already
has this index information somewhere (isn't it used for pydoc?).

But I don't care enough to code up a solution. =)

-Brett

> On Sun, Aug 24, 2008 at 12:06 AM, Benjamin Peterson
> <musiccomposition at gmail.com> wrote:
>>
>> On Sat, Aug 23, 2008 at 4:03 PM, Abdallah El Guindy
>> <abdallah.elguindy at gmail.com> wrote:
>> > Hey all
>> >
>> > I know that the feature I am about to suggest may be minor and may have
>> > a
>> > very low priority considering other issues to be discussed, however I'll
>> > suggest it anyways..
>> >
>> > Being a very frequent user of the interactive shell, I find it annoying
>> > when
>> > I try to use a function or a class that resides in another module that I
>> > haven't imported... So why not let the interactive shell say a message
>> > about
>> > the appropriate module to be imported for this class/function.. The idea
>> > is
>> > similar to bash on Ubuntu, if you don't have the necessary package it
>> > lets
>> > you know by suggesting the package name to be installed.
>>
>> How would that be implemented? At the least, every module and package
>> on sys.path would have to be scanned.
>> >
>> > Let me know what you think.
>> >
>> > Thank you.
>> >
>> > _______________________________________________
>> > Python-3000 mailing list
>> > Python-3000 at python.org
>> > http://mail.python.org/mailman/listinfo/python-3000
>> > Unsubscribe:
>> >
>> > http://mail.python.org/mailman/options/python-3000/musiccomposition%40gmail.com
>> >
>> >
>>
>>
>>
>> --
>> Cheers,
>> Benjamin Peterson
>> "There's no place like 127.0.0.1."
>
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe:
> http://mail.python.org/mailman/options/python-3000/brett%40python.org
>
>


More information about the Python-3000 mailing list