November 2001
Beginner
320 pages
5h 53m
English
Python comes with a number of modules for communicating with network servers as a client. Most of these provide the same functionality as their Perl equivalents and because the Perl modules work on a class/object basis migrating from a Perl based client to a Python based client shouldn't be too difficult. For reference, I've listed the common Perl modules and their Python equivalent modules in Table 12.4.
| Perl module | Python equivalent |
|---|---|
| Net::SMTP | smtplib |
| Net::FTP | ftplib |
| Net::NNTP | nntplib |
| Net::POP3 | poplib |
| Net::xMAP | imaplib |
| LWP::Simple | urllib |
| URI | urlparse |
| URI::Escape | urllib |
We'll take a look at some of the more commonly used modules and some Perl and Python equivalent ...