[Zope] Can I do this in a python products ??

Nicolas Évrard Nicolas Évrard
Fri, 3 May 2002 13:42:34 +0200


Hello, everyone,

Since this is my first post on this lis, I will introduce myself shortly.

I'm a developper in a small enterprise which has a huge internet
project, since I am a great user of linux and of python I naturally
tough about doing all my job in Zope. At first I played with
dtml-scripting and so on. But now I'd like to make a little product and
when I'll be fluent in this kind of programming, I will migrate the
whole site to Product-like programming.

Now, my question :

I do this in the initialization of my product :
    fd = open('the_file')
    line = fd.readline()
    while line : 
        process_line(line)
        line = fd.readline()


The file 'the_file' is in the base directory of the product but I keep
getting 'No such file'. I then decided to put this file on the Zope
Directory where my product will be localized but the same problem arose.

Is it possible to have some kind of a rc-file for a product the need to
be parsed (this file residing either in the product directory or in the
zope directory).

Maybe I'm all wrong and that's not the way I ought to think in Zope ...

-- 
Évrard Nicolas
SOLIREM SA - Projet Smartainers
1, rue de l'épervier                              Tel: +32 4 248 08 85
B-4040 Herstal                                    Fax: +32 4 248 05 78