Importing modules

Terry Reedy tjreedy at udel.edu
Fri May 1 23:42:47 CEST 2009


norseman wrote:

> OH - something you mentioned that didn't seem to be addressed.
> import - load a complete library
> from   - obtain specific 'function'(s) from a library

from can also be used to get a specific module from a package

If you 'import pack.mod', then you have to write 'pack.mod.ob' to access 
anything within mod.  But if you do 'from pack import mod', then just 
'mod.ob' works.




More information about the Python-list mailing list