The most important modules

Remco Gerlich scarblac at pino.selwerd.nl
Tue Mar 20 10:22:31 EST 2001


Lyle Johnson <ljohnson at resgen.com> wrote in comp.lang.python:
> > I've seen a few comments along the lines of "When you are a newbie it will
> > take a while to realize which the important modules are."  As someone who
> > is in the middle of wading through Chapter 3 of the Library Reference, it
> > would be very helpful to know which ones are particularly worth
> > noting.  (Presumably  sys, (c)Pickle and shelve, from the ones I've so far
> > in the chapter - but what other treats are out there for me?)
> 
> For writing scripts that deal with files (whether for system administration
> or other tasks), you should get familiar with the "fileinput", "glob" and
> "os" modules.

And "shutil" if you have to copy or remove files. People forget about that
one.

> All of Python's support for regular expressions comes in
> through the "re" module, so that will be one you'll want for some
> text-processing needs. And I've been meaning to teach myself how to use the
> source-level Python debugger module, "pdb", but haven't gotten around to
> that yet;
> 
> A lot of the other modules get into more application-specific needs, whether
> it's for network support ("ftplib", "httplib", ...), XML processing
> ("xml.*") or others.

"urllib" is always so easy to use :)

> But it's all good stuff. And of course the standard
> Python library doesn't even scratch the surface of what's available; you'll
> also want to check some of the other sources for contributed software, like
> the Vaults of Parnassus:
> 
>     http://www.vex.net/parnassus/

Especially win32all for Windows, PIL for images, NumPy for numerical things,
and the mx* modules like mxDateTime (that should be in the standard library).

It doesn't hurt to just read through the library reference now and then, try
some things out, etc. I've never read it back to back, I would forget most
of it anyway...

-- 
Remco Gerlich



More information about the Python-list mailing list