[Python-Dev] Tutorial: Brief Introduction to the Standard Libary

Gerrit Holl gerrit at nl.linux.org
Thu Nov 27 12:44:30 EST 2003


Raymond Hettinger wrote:
> I'm adding section to the tutorial with a brief sampling of library
> offerings and some short examples of how to use them.

I think it's a great idea.

> My first draft included:
>     copy, glob, shelve, pickle, os, re, math/cmath, urllib, smtplib

> - csv (basic tool for sharing data with other applications)
> - datetime (comes up frequently in real apps and admin tasks)
> - ftplib (because the examples are so brief)
> - getopt or optparse (because the task is common)

If one of those is chosen, I'd go for the latter, because it can do
more and it's more OO.

> - operator (because otherwise, the functionals can be a PITA)
> - pprint (because beauty counts)
> - struct (because fixed record layouts are common)
> - threading/Queue (because without direction people grab thread and
> mutexes)

Hm, not sure whether this should be in the tutorial.

> - timeit (because it answers most performance questions in a jiffy)
> - unittest (because TDD folks like myself live by it)

- email (because it's impressive and common)
- textwrap (because I love it :) and it's useful)

But of course, it should stay a tutorial, and not become a reference.
Users are intelligent enough to skim through the standard library
looking for libraries. We should make a selection. Maybe some of them
should only be pointed to, without going into detail about how to use
it?

yours,
Gerrit.

-- 
135. If a man be taken prisoner in war and there be no sustenance in
his house and his wife go to another house and bear children; and if later
her husband return and come to his home: then this wife shall return to
her husband, but the children follow their father.
          -- 1780 BC, Hammurabi, Code of Law
-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/



More information about the Python-Dev mailing list