On Tue, 15 May 2007, Kent Johnson wrote: > Matt Smith wrote: > > > > Thanks for the help. For future reference how do I go look at the > > implementation of a particular function (the ones coded in Python, I > > don't know C)? > > Look in the lib directory that was installed with Python. The location > varies. On Windows look for C:\Python2.x\Lib. My Mac has it at > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 > > In the python interpreter, try > >>> import sys > >>> sys.path > > The lib directory will be listed as one element of sys.path.
Will the following approach always work? It's what I start with. >>> import calendar >>> print calendar.__file__ C:\Python25\lib\calendar.py _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor