[Tutor] Libraries/Modules and how well you know them?

Kent Johnson kent37 at tds.net
Sun Mar 23 03:24:34 CET 2008

r dascenzo wrote:

> What are the distinctions between a library and a module? Do people  
> frequently use the terms interchangeably in conversations, mailng  
> lists, and around the web?

"module" is very specific, it is a single Python source file. A library 
is a collection of useful modules.

> Looking at the index, there are hundreds of modules. Do "good"  
> programmers know the contents of all the modules and functions without  
> having to look them up?


> Are there any suggestions on which might be  
> the most useful to become familiar with at first?

Um, the ones that do things that you want to do?

The table of contents for the library docs gives a more useful organization:

I strongly recommend chapters 2 and 3 to every Python programmer - they 
include docs for all the built-in functions and data types. Experienced 
Python programmers do know much of this without having to look it up.

Other than that...

os and os.path have many useful functions for working with files and 
file paths.

re is extremely useful but difficult to learn.

datetime has lots of useful date handling stuff.

sys, csv, itertools, collections, urllib2, logging, unittest are some of 
the modules I use regularly. But your needs may be different. Browse the 
table of contents and take a closer look at the ones that look useful to 


More information about the Tutor mailing list