a blog by Marius Gedminas

Posts tagged Python

Zope 3 request recorder

Zope 3 has this notion of functional doctests: functional tests (in the form of standalone doctest files) that pretend to perform HTTP requests to your Zope 3 server, and look at the response. Here's an example test from SchoolBell. You can create functional doctests by using your browser and recording your session with TCPWatch, and then running a Python script that comes with Zope 3: dochttp. For some reason I found this method too cumbersome and usually just cloned existing doctests and changed the requests and responses by hand.

How to use Zope 3 generations

When you're developing a Zope 3 based application, and you want to make old object databases continue to work as you change object attributes, you should consider Zope 3 database generations. The DatabaseGenerations proposal in the Zope 3 wiki describes the problem and possible solutions. README.txt for the zope.app.generations package tells you about the internals. The zope.app.zopeappgenerations package is a real-world example of generations. This mini-article strives to be a HOWTO.

Looking for an IRC bot

I'm looking for an IRC bot, mostly to provide logs of IRC conversations. I want and extensible one that is written in Python, so that I can add extra features (e.g. announcements of subversion commits). I want one that is in mature, usable, and available in Debian. apt-cache search python irc bot gives me two answers: libsoap-lite-perl (wha..?) supybot Looks like I'll be investigating supybot. It appears to have a lot of features that I'm not interested in.