[Tutor] Import Modules
Kent Johnson
kent37 at tds.net
Thu Apr 16 12:37:13 CEST 2009
On Thu, Apr 16, 2009 at 3:21 AM, ALAN GAULD <alan.gauld at btinternet.com> wrote:
>
>
>> In general, importing a package does not give access to members of a
>> sub-package.
>
> Interestingly I added the comment about sub packages specifically
> because I remembered os.path and assumed it was the norm! :-)
Yes, it took me a long time to realize that it is not. Strictly
speaking I don't think os is even a package, it is a module that
imports another module as it's path attribute. There is no os
directory or os/__init__.py or os/path.py.
Kent
More information about the Tutor
mailing list