Saturday, September 24, 2005

Zissue (Zope3 product) report (I)

I created few views and wrote some unit and functional
tests, though learning very slow still...

I was very excited when my first functional test got run.
Now I am catching up with Test Driven Development,
but documention is still poor.

Subversion repository is here:

I am also planning few simple Zope3 apps, so that I can easily
make my first stable release.

Day after to morrow is our election to 'Panchayath'

Friday, September 16, 2005

Zissue My experimental Zope3 product.

Yesterday was Thiruvonam (

And I didn't made any progress in Zope3 learning,
Also I was wondering about this problem:

Today only I got a solution:

Just to track my development, I created a project at BerliOS:

I have committed the source to Subversion, to check out:

svn checkout svn://

So far only few interfaces, today I will create one view for Comments,
and I have to figure out how to handle attachments (implement IFile, how?).

Monday, September 12, 2005

Zope3 study part-1

Today I started experiments with Zope 3, Last few weeks I
took print outs of Zope3 book's most of the pages in DotMatrix :)

I think the learning curve is too steep, but it was very interesting.

When I started learning PyGTK, I created a usable app in one week.
My motivation to learn PyGTK was redhat-config-* tools, there was
nothing interesting in those apps, but it amazed me that it was very cool.

This is first time I am learing a framework (hmm.. there is PyUnit,
but its not that much difficult). May be for developing huge apps,
big frameworks will be required, anyway I will look into other
alternatives after Zope3 becomes comfortable.

First I created an instance of zope at /var/tmp/tzope/

then created a package at /var/tmp/tzope/lib/python

and It is 'Zissue Tracker' (an experimental zissue/bug tracking
system for learing Zope 3)

So the package reside in : /var/tmp/tzope/lib/python/zissuetracker

Today (Sunday) I came to my office just to work on it.
Now I only finished few interfaces.

I just tried to publish it, but failed will try tomorrow.

Update (I have uploaded it here) :

Friday, September 2, 2005

getdefault method for python dictionary

In this blog:

Blogger says that Python's dictionary method, 'setdefault' without explicit default
is confusing and useless. Now I think there should be a 'getdefault' method
which also requires two explicit arguments, it will return explicit default
if no key exists.

Here is an example:

>>> d = {1: None}
>>> print d.getdefault(1, 'Hi')
>>> print d.getdefault(2, 'Hi')

Hmm.. there is already a 'get' method. If we have 'getdefault'
then 'get' can be deprecated, Here is the reason:

>>> d = {1: None}
>>> print d.get(1)
>>> print d.get(2)

See, here I didn't thought about any use cases.