What’s new? I’m pleased to announce the release of virtualenvwrapper. This new version uses a significantly rewritten version of the hook/callback subsystem to make it easier to share plugins for enhancing developer workflow. For example, released at the same time is virtualenvwrapper-emacs-desktop, a plugin to switch emacs project files when you switch virtualenvs.
I also took this opportunity to change the name of the shell script containing most of the virtualenvwrapper functionality from virtualenvwrapper_bashrc to virtualenvwrapper.
The Python Module of the Week series started March 25, 2007 as a personal challenge to learn more about the Python standard library. Since that time, it has grown into something bigger than I ever expected. The series now includes 149 articles with example code showing how to use different parts of the Python standard library. The latest release of the collection includes examples for 119 modules and the PDF version spans 670 pages.
This is a special anniversary edition of PyMOTW. The first module I wrote about was fileinput. In honor of the third anniversary of the start of the series, I’ve updated the examples for fileinput and filled in more detail about features provided by the module.
Read more at pymotw.com: fileinput
In addition to its parsing capabilities, ElementTree also supports creating well-formed XML documents from Element objects constructed in your application. The Element class used when a document is parsed also knows how to generate a serialized form of its contents, which can then be written to a file or other data stream.
Read more at pymotw.com: etree/ElementTree/create.html
Parsed XML documents are represented in memory by ElementTree and Element objects connected into a tree structure based on the way the nodes in the XML document are nested.
Read more at pymotw.com: xml/etree/ElementTree/parse.html
Consistent use of indentation is important in a language like Python, where white-space is significant. The tabnanny module provides a scanner to report on “ambiguous” use of indentation.
Read more at pymotw.com: tabnanny
Quick Review My review for the impatient reader:
Why I picked it up: I have some basic knowledge of and experience with VMware, but wanted learn more about Xen and Hyper-V.
Why I finished it: It reads quickly and provides a good grounding in virtualization terms and technologies.
I’d give it to: Anyone looking into upgrading their infrastructure using modern virtualization tools.
Review Practical Virtualization Solutions by Kenneth Hess and Amy Newman covers a lot of ground.
cgitb was originally designed for showing errors and debugging information in web applications. It was later updated to include plain-text output as well, but unfortunately wasn’t renamed. This has led to obscurity and the module is not used as often as it should be. Nonetheless, cgitb is a valuable debugging tool in the standard library.
Read more at pymotw.com: cgitb
Matplotlib for Python Developers by Sandro Tosi is the latest in a series of concise project-specific manuals from Packt. It covers the matplotlib library for creating charts and graphs.
Quick Review My review for the impatient reader:
Why I picked it up: I thought it might help with a project at work.
Why I finished it: I wanted to see what features matplotlib had the could be useful, and how to integrate it with web frameworks.
I’ve seen a few people talking about how they use virtualenvwrapper on twitter, including some links to customizations like these aliases from Holger Krekel.
If you have some tips of your own, I’d appreciate a link in the comments here. Once I have a few collected, I’ll pull together some of the interesting ones and add them to the documentation.
So, how do you use virtualenvwrapper?