[Zope] using a ZODB standalone app with Zope

Istvan Albert ialbert at mailblocks.com
Thu Feb 17 16:04:58 EST 2005


Hello All,

I'm trying to migrate a ZODB standalone application for use in
Zope. I have a module that instantiates a ZODB storage
upon import and then has module functions that
return the root for this database.

---
storage = FileStorage.FileStorage(Config.DB_FILENAME)
db = DB(storage)

def get_root():
     conn = db.open()
     return conn.root()

def commit():
     get_transaction().commit()

---

The current setup does not work in Zope, I get timeout errors
and I'm guessing that the two databases interfere somehow. What
I plan to do is to make use of the database created by Zope instead.

In a python script how would I go about fetching the root
of the database that is used by Zope.

thanks,

Istvan.



More information about the Zope mailing list