PyMOTW: signal

Signals are a means of notifying your program of an event, and having it handled asynchronously. They can be generated by the system itself, or sent from one process to another. Since signals interrupt the regular flow of your program, it is possible that some operations (especially I/O) may produce error if a signal is received in the middle. Read more at pymotw.com: signal

Python Documentation Power-User Tip

If you find yourself referencing the Python standard library documentation a lot while you’re programming, you should set up a keyword bookmark in Firefox. I haven’t seen this feature talked about very much, so maybe everyone just knows about it, but I find it saves me a ton of time so I wanted to share. Keyword Bookmarks: Keywords bookmarks are just like regular bookmarks, but have a short identifying word associated with them.

Python Module of the Week, meet reST and Sphinx

Release 1.65 of the Python Module of the Week includes HTML documentation created with Sphinx from reStructuredText versions of all of the posts so far. The documentation is included in the source download, or you can browse it online from the PyMOTW home page. I have been a long time StructuredText user, using it with Zope and some home-grown tools to produce DocBook output for dead-tree documentation. When reST was being created, I dismissed it as comparatively ugly and overly complicated.

PyMOTW: webbrowser

The webbrowser module includes functions to open URLs in interactive browser applications. The module includes a registry of available browsers, in case multiple options are available on the system. It can also be controlled with the BROWSER environment variable. Read more at pymotw.com: webbrowser

need help with sphinx and LaTeX

Dear Lazy Web, I’ve started using sphinx to produce some documentation at work. The HTML output looks good, and I have the templating system figured out so I can change it to look the way we want. We also want to produce a PDF, and that’s where I’m stuck. It looks like I need to go through LaTeX, then convert that to PDF. I’m a complete neophyte when it comes to TeX, though, so I’m not even sure where to start.

Community Participation

Our authors are having an impact through their participation in the global Python community, and we couldn’t be more proud to support them. One of my main motivations for becoming involved with Python Magazine was to contribute back to the Python community that has provided so much help to me in the past. I’ve had access to innumerable open source programs and libraries, learned about algorithms and development techniques from some of the best programmers around, and received a good share of support in the form of bug reports and patches for my own projects.

Python Magazine for July 2008

The July issue is available for download now. Brandon Rhodes delivers another cover story for us, this time on Kinetic Style Sheets. KSS is a JavaScript engine that interprets files full of CSS-like instructions that can launch both client-side and server-side actions in response to the user’s typing and clicks. Brandon makes it look easy, as usual. Speaking of easy, Jonathan LaCour takes all of the mystery out of metaclasses with an explanation clear enough to make me reconsider using them in my own work.

PyMOTW: uuid

RFC 4122 defines a system for creating universally unique identifiers for resources in a way that does not require a central registrar. UUID values are 128 bits long and “can guarantee uniqueness across space and time”. They are useful for ids for documents, hosts, application clients, and other situations where a unique value is necessary. The RFC is specifically geared toward creating a Uniform Resource Name namespace. Read more at pymotw.

PyMOTW: base64

The base64, base32, and base16 encodings convert 8 bit bytes to values with 6, 5, or 4 bits of useful data per byte, allowing non-ASCII bytes to be encoded as ASCII characters for transmission over protocols that require plain ASCII, such as SMTP. The “base” values correspond to the length of the alphabet used in each encoding. There are also URL-safe variations of the original encodings that use slightly different results.

svnbackup 1.6

What’s new? Adam Crews provided a patch to svnbackup.sh that adds an option to let the user control the base name of dump files. I’ve rolled up the changes in release 1.6, available for download from the project home page. Thanks, Adam!