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

Ron Adam rrr at ronadam.com
Tue Aug 26 21:48:17 CEST 2008



Abdallah El Guindy 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.
> 
> Let me know what you think.

I think the best way to add this is to add it to the help function, which 
is the console interface to pydoc.  Something like help(find="name") could 
find all instances of name in all available modules.

Ron




More information about the Python-3000 mailing list