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

Patrick K. O'Brien pobrien@orbtech.com
Sat, 9 Jun 2001 09:52:03 -0500


Cool idea. Could I suggest a small change, though? The documentation for
site says this:

"After these path manipulations, an attempt is made to import a module
named sitecustomize, which can perform arbitrary additional
site-specific customizations.  If this import fails with an
ImportError exception, it is silently ignored."

So would it make more sense to create a sitecustomize.py file with your
code? I'm going to give it a try, as soon as I have another cup of coffee.

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
Daniel Yoo
Sent: Saturday, June 09, 2001 2:06 AM
To: Timothy Wilson
Cc: Python-Edu SIG; tutor@python.org
Subject: [Tutor] Re: [Edu-sig] Python resources CD available [getting help()
as a builtin]


>> 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.



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor