New PyMOTW site logo

Last week Nils-Hero Lindemann contacted me with some icons to spruce up the PyMOTW site. I love the look and the thought that went into the design.

PyMOTW icon

“The four squares symbolize the modules and the white square is the current module, the ‘module of the week’.”

Thanks, Nils-Hero! I am touched that you took the time not only to create the image files, but also to work out (and tell me) exactly what I need to do to add them to the HTML properly.

io — Text, Binary, and Raw Stream I/O Tools — PyMOTW 3

The io module provides access to the built-in open() function and the classes used to implement file-based input and output operations. The classes are decomposed in such a way that they can be recombined for alternate purposes, for example to enable writing Unicode data to a network socket.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

importlib — Python’s Import Mechanism — PyMOTW 3

The importlib module includes functions that the underlying implementation of Python’s import mechanism for loading code in packages and modules, all implemented in Python. It is one access point to importing modules dynamically, and useful in some cases where the name of the module that needs to be imported is unknown when the code is written (for example, for plugins or extensions to an application).

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

urllib.robotparser — Internet Spider Access Control — PyMOTW 3

robotparser implements a parser for the robots.txt file format, including a function that checks if a given user agent can access a resource. It is intended for use in well-behaved spiders, or other crawler applications that need to either be throttled or otherwise restricted.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

unittest — Automated Testing Framework — PyMOTW 3

Python’s unittest module is based on the XUnit framework design by Kent Beck and Erich Gamma. The same pattern is repeated in many other languages, including C, Perl, Java, and Smalltalk. The framework implemented by unittest supports fixtures, test suites, and a test runner to enable automated testing.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.