The collections module includes container data types beyond the built-in types list, dict, and tuple .
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.
The atexit module provides an interface to register functions to be called when a program closes down normally.
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.
The contextlib module contains utilities for working with context managers and the with statement.
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.
The argparse module includes tools for building command line argument and option processors. It was added to Python 2.7 as a replacement for optparse . The implementation of argparse supports features that would not have been easy to add to optparse , and that would have required backwards-incompatible API changes, so a new module was brought into the library instead. optparse is now deprecated.
Read more…
This post is part of the Python Module of the Week series for Python 3.
The queue module provides a first-in, first-out (FIFO) data structure suitable for multi-threaded programming. It can be used to pass messages or other data between producer and consumer threads safely. Locking is handled for the caller, so many threads can work with the same Queue instance safely and easily. The size of a Queue (the number of elements it contains) may be restricted to throttle memory usage or processing.
Read more…
Over the last several years since my book, The Python Standard Library by Example, was published many folks I’ve talked with at conferences or by email have asked when I would be updating the content for Python 3. I’ve been putting off that work, mostly because of other projects. I’m happy to announce that I’ve finally started updating the content and intend to publish updates weekly.
The new versions of the articles, updated and rewritten for Python 3.
virtualenvwrapper is probably the most popular tool I maintain. A surprising number of people use the current version of the shell scripts that grew out of a hacky little set of bash aliases I wrote 7+ years ago. There are even several competitors now. I created a market segment! ;)
Perhaps ironically, I’ve found my own needs have changed enough that I don’t use it much myself any more. Most of my work these days involves OpenStack, and we have enough tooling consistency built into our repos that I don’t need a ton of virtualenvs.
For the Mitaka cycle, we will be implementing changes designed to make it easier for project teams to manage their own projects, with less need for coordination and tight-coupling of the schedule.