pydoc&readline Re: some questions unanswered - new programmer ...

Roman Suzi rnd at onego.ru
Sun Aug 5 13:04:14 EDT 2001


On Sun, 5 Aug 2001, Thomas Wouters wrote:

>On Sun, Aug 05, 2001 at 10:54:10AM +0400, Roman Suzi wrote:
>
>> >I have this in my PYTHONSTARTUP file.  Pydoc is pretty damn cool.
>
>> It could be even cooler if it supported readline!
>
>Why/how do you want pydoc to support readline ? Isn't it enough that the
>interpreter supports readline ?
>
>import readline,rlcompleter
>readline.parse_and_bind("tab: complete")

If it is for free, why not? It is very common that I see:

help> ^[[A

because I hoped to get history and pressed up-arrow, etc, etc

I think the interactive environment must not change it's properties to be
user-friendly. And now I need to remember where I can use readline and
where not! This makes fingers nervous.

For example, pydoc could let me autocomplete modules names
(interpreter's readline doesn't allow this!) and help topics.
More than that, if I completed module name and try to complete
after dot, I will receive usual "intellisense", for example:

help> dircache.
dircache.__all__   dircache.__name__  dircache.listdir   dircache.reset
dircache.__doc__   dircache.annotate  dircache.opendir
dircache.__file__  dircache.cache     dircache.os
help> dircache.

And I am sure that help> and >>> must have shared histories. This will
make easy to return to interpreter with names already typed. This
 could be good addition to readline in interactive prompt.


Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Sunday, August 05, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "By all means, let's not confuse ourselves with the facts!" _/





More information about the Python-list mailing list