module confusion

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Tue Oct 2 08:34:29 CEST 2007


In message <mailman.1379.1191301581.2658.python-list at python.org>, Robert
Kern wrote:

> Not all of the modules in a package are imported by importing the
> top-level package.

You can't import packages, only modules.

> os.path is a particularly weird case because it is just an alias to the
> platform-specific path-handling module; os is not a package.

os is a module, os.path is a variable within that module. That's all there
is to it.



More information about the Python-list mailing list