The most important modules

Lyle Johnson ljohnson at resgen.com
Tue Mar 20 09:46:52 EST 2001


> 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. 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. 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/

Hope this helps,

Lyle






More information about the Python-list mailing list