[Edu-sig] Python resources CD available [getting help() as a builtin]

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Sat, 9 Jun 2001 00:06:10 -0700 (PDT)


>> Is it practical and possible to have pydoc's help() function 
>> autoloaded by bundling a modified interpreter?

> Yes, I've followed that discussion on the tutor list too. I think some
> sort of interactive help would be great. I'm afraid modifying the
> interpreter is a bit beyond me at this point, however. Making the CD
> more interactive would be very cool, no doubt.


Yahoo!  We don't need to recompile at all: we just need to append the
following to site.py within the library :

###
## (within site.py)
## Added by dyoo
from pydoc import help
__builtin__.help = help
del help
###

That will do it!  Afterwards, help() will appear to be a builtin.  I'll
crosspost this to the tutor list; people were wondering about this one.  
This should definitely make things nicer for people.