[Zope] More product writing problems

Tille, Andreas TilleA@rki.de
Tue, 4 Dec 2001 17:20:31 +0100 (CET)


Hello,

I want to write my own instance of FOlder product maintaining a set of
keywords.  This worked so far but I want to strip some spaces from the
keywords the user might have prepended/appended.  I wanted to use the
following code:

    ob=MyFolder()
    ob.id=str(id)
    ob.title=title
    ob.keywords={}
    for kw in keywords:
        kw=kw.strip()
        if kw != '' :
            ob.keywords.append(kw)
    self._setObject(id, ob)
    ob=self._getOb(id)

Well, obviousely this is intended to work under python2.1.
Because of a broken Zope 2.4.2 installation which does not show up my
product in the products folder mysteriousely (see thread "Problems writing
a new product") I use Zope 2.3.3 (Debian/GNU Linux Woody zope_2.3.3-1)
which depends from Python 1.5 - at least under my system.  If I
link /usr/bin/python to /usr/bin/python2.1 zope does not start because
of some modules (namely 'os') are not found.

So how can I write this code safe even for older Python versions or
does anybody has an idea how to fix the broken Zope installation?
What other logfiles could I observe.  I did not found any others than
Z2.log.

Kind regards

        Andreas.