When is a module imported from the standard library?

Jeff Shannon jeff at ccvcorp.com
Wed Aug 22 18:37:55 EDT 2001


cary miller wrote:

> > print os.path.dirname(os.__file__)
>
> is simplest if you only want to know about the os module.  To get the
> location of any module do this:

[... snip ...]

Well, the point of this discussion was to find the location of the standard
library.  As the os module is a part of the standard library, it stands to
reason that locating os will locate the standard lib directory....   ;)

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list