When is a module imported from the standard library?

Jeff Shannon jeff at ccvcorp.com
Thu Aug 23 00:37:55 CEST 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
Credit International

More information about the Python-list mailing list