Big thanks to David Goodger for releasing docutils 0.3 (the software that implements reStructuredText). This makes it a lot easier to integrate docutils into a project since there's now an up-to-date static version (for a while we've had to worry about the CVS changing underneath us, which is a pain).
From Anthony, btw, for debugging purposes, I recommend the following snippet:
import traceback def compact_stack(): stack = traceback.extract_stack() stack = [ '%s:%d'%(x, x) for x in stack ] return "Stack\n" + "\n".join(stack)
I've also used the following as a generic debug() call in Zope code (though any logging package could replace zLOG here):
def debug(*args): module, line, function, info = traceback.extract_stack()[-2] if len(args) == 1: s = pprint.pformat(args) else: s = pprint.pformat(args) file = os.path.split(module) LOG('\n%s\n in %s, line %s, debug info:'%(module, function, line), INFO, '\n'+s)
traceback.extract_stack function is so useful :)
I got enough people bugging me to see the code, so here it is.
I've had a couple of emails regarding my posting of the web framework shootout yesterday. It's been pointed out that that page is quite a nice overview in some respects (the examples give a nice up-front indication of what you're in for) but it is not complete and doesn't necessarily present the complete feature set that each framework provides. A more complete overview is available at the python.org wiki Web Programming page. It would be nice to have the examples from the first in the wiki page :)
If anyone's interested, I just put out version 1.2.2 of WebUnit, my "website unit/regression testing tool". This release has a couple of patches from Roché Compaan.
This is some very good news. More Qt/Mac goodness, meaning:
Sam Magnuson from Trolltech already got much of KDE building on Qt/Mac a while ago (screenshots showing Konqueror, Kontact, Games and KOffice). The new license now offered allows to distribute binary builds of KDE for Qt/Mac soon.
from the dot
I just pointed a friend at The Web Framework Shootout which I'd known about but never actually looked at until now. It's definitely my next stop before I develop my next web application. PyPI would probably have turned out slightly differently if I'd gone there first (and had a vague idea of how much web interface I'd end up developing for it - which was obviously more than I'd orignally anticipated ;)
I'm leading the development team at Common Ground - both in terms of spec / design and planning the project. I've done this before, and am fairly comfortable doing it, but in this instance I didn't have M$ Project readily at hand when it came to estimating the project timeline. This turned out to be a good thing since I ended up writing a simple task planner in Python. The initial cut took a few hours, and I've been refining it small since then (adding Milestores, and Stuart wrote a gantt chart HTML renderer too).
Stuff the code does:
- List of tasks with dependencies and resource requirements, eg:
(1, 'Core', 'Dynamic Roles', 'dev', 5, ), (2, 'Core', 'Permissions views', 'web', 5, ), (3, 'Core', 'Unique-/One-Time-Key store','Richard', 3, ),Note that the resource is defined as either a skill or a person, and a number of days. Anything more granular than days is silly, and the ability to say that Gus, Stuart and Richard are all capable of performing 'web' tasks is quite valuable (and AFAIK M$ Project doesn't do that!)
- Plan the schedule of tasks, including Milestones, and dump the result
as an HTML table with columns for all participants and rows for each week.
For example (snippet of results here):
Week Date Gus Richard Stuart Milestones 0 01 Jun 5: Other Inactive 3: Core Unique-/One-Time-Key store
2: Ontology Schema
5: Ontology Ontology 1 08 Jun 1: Other Public Holiday
2: Other Inactive
2: Core ZMI LAF customisation
1: Other Public Holiday
3: Ontology Schema
1: Ontology Storage
1: Other Public Holiday
4: Ontology Realm
2 15 Jun 5: Core ZMI LAF customisation 2: Ontology Storage
2: Work Meta-data spec
1: Other UNUSED
1: Ontology Realm
2: Publisher Meta-data spec
2: Identity Meta-data spec
3 22 Jun 5: Core ZMI LAF customisation 5: Identity Meta-data edit view 5: Identity Identities 4 29 Jun 3: Core ZMI LAF customisation
2: Other UNUSED
5: Identity Login / signup views 5: Publisher Publishers 5 06 Jul 5: Publisher Publisher views 2: Publisher Identity Adjunct Info
3: Other Zope3 Sprint
2: Work Works
3: Other Zope3 Sprint
- Indicate that Stuart and I are going to be Zope Sprinting in mid-July, and that I have three weeks of paternity leave planned for mid-November, and so on.
So it's pretty rough & simple stuff, and modifying the dependencies is a bit of a pain without the visual cues that M$ Project gives (writing a GUI or at least instant-feedback rendering of dependencies would be a next step, and not at all difficult). But even with its simplicity, I've been able to give esitmates of the project's timeline - including being able to trivially pull out or add new team members and quickly show the result (ie. add in anew 'web' capable person). I might look into making an SF project for this... I dunno... I already have too many :)
Collaborative editing over a LAN. Very nice. But I want to do it over a WAN. Does anyone know of a tool like Hydra that will work over a WAN? Linux and/or Mac OSX...
I gave a presentation about reStructuredText (and ZReST) to the OzZope meeting last night. The presentation went well (there was about a dozen people in attendance, and none appeared to fall asleep). I'll make it available some time soon - well, as soon as I get it out of PowerPoint.
I wanted to write the presentation using my old ReST → PythonPoint tool, and revamped it accordingly. Unfortunately, the handling of images is very poor in PythonPoint (it seems to want to scale them up or something) so I had to ditch that. I was running out of time, and powerpoint was the only viable alternative. An ReST → SlideML converter would be quite possible, I'm sure, so maybe some rainy day soon...
In other news, the OzZope meeting went well, discussing the upcoming Zope3 Sprint and some moves in the schools to get Plone installed for intranet use. We also had a demo of Silva and IRC chat with its creators. That was fun (I was forced to blush at one point when someone realised that I was the Roundup Richard Jones ;)
On the other front, I've determined that there is indeed an undo-less store in Zope 2.7, the BDBMinimalStorage (it even appears in the above cofig schema :). Unfortunately, Zope 2.7 is currently unable to mount the store. I could fall back on DBTab, but I can wait for the support in Zope itself (saving myself the effort of implementing the mounting twice).
I found some documentation for the config vars for BDBMinimalStorage and I'll copy them over to the ZConfig schema. Or perhaps not. The descriptions will appear in three places then, and that seems a little suboptimal.
Unfortunately, it's a bit difficult to get into as an end user - there's a whole lot of configuration flexibility now, and there's no real way to actually discover the shape of it all. Nobody seems to have thought it important to actually document all those wonderful new configuration options. OK, that's harsh - they're still in a bit of a state of flux, and there's other more important things to be doing at the moment, I'm sure.
Specifically, I need to figure how to configure a ZODB to be undo-less, then how to configure a ZEO server to serve that and finally how to have a bunch of Zope servers connect to that ZEO server. So far the zope.org site and associated documentation seems to indicate that it's possible, just not how to do it.
So I wrote an introspection tool - after spending a number of hours
deciphering the internal storage system of the ZConfig system. The result
and a dump of the Zope
configuration vars as in the current (today, 2 June 2003) CVS. Run the
script in your Zope
lib/python directory (or at least have
that dir in your Python search path). Some examples:
zconfig_schema2html.py Zope/Startup/zopeschema.xml >Zope_schema.html zconfig_schema2html.py ZEO/schema.xml >ZEO_schema.html
Can't dump individual components yet - the ZConfig schema parser won't let us. Other enhancements to the dumper would include displaying default values and an indication of where the component XML files for the schema are located. Not sure I can access the information about the latter. It's generally pretty obvious from the data type in question.
Unfortunately my efforts didn't actually help with the question at hand: how to config up an undo-less database in a Zope/ZEO instance. Poking somewhat more I get the distinct impression that the undo-less store doesn't exist anymore, which seems a little wrong. I think (hope) I'm just reading the code wrong. I've never used them before, but I was sure they existed...
Oh, and as per usual I fixed a couple of bugs in Zope along the way ;)