Bob, cd into the lib/python directory inside your Zope install... fire up the Python interpreter and do:
import Zope app = Zope.app()
"app" is a handle to the Zope "root object", and your folders and methods can be accessed via attribute lookup ala: app.aFolder or app.aFolder.aSubFolder.aMethod The rest is a small matter of programming :-)
-----Original Message----- From: Bob Skaroff [mailto:rdskaroff@geocities.com] Sent: Sunday, August 20, 2000 11:56 PM To: zope@zope.org Subject: [Zope] accessing data.fs outside of Zope
I have been trying to put together a little script to dump the contents of Zwiki Pages into a text file. I can find the dictionary objects holding the meta_type and id of the Folder object containing the Zwiki site, but I don't know how to get to the Zwiki Pages inside it. This is what I'm coding:
import Zope import ZODB db = ZODB.DB(ZODB.FileStorage.FileStorage('mydata.fs')) conn = db.open() root = conn.root() c = root._container c['Application']._objects lists the dictionaries, like ({'meta_type':'User Folder', 'id':'acl_users'}, {'meta_type':'Folder','id':'MyZwiki'}, etc.)
How do I get to the Zwiki Pages objects inside MyZwiki ?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )