ZODB and 'root()' object (QUEST)
HI, In the python interpreter I have done the following things:
import sys, ZODB, ZODB.FileStorage db = ZODB.DB(ZODB.FileStorage('/usr/local/zope/zope214/Data.fs')) root=db.open().root()
Where 'Data.fs' is my Zope DB with a lot of stuff. Then I did the following things:
root.__dict__ {} #result of the previous "command" dir(root) [] #result of the previous "command" vars(root) {'container' : {}} #result of the previous "command"
I expected to find the stuff I have in my Zope DB. I double checked to look if I didn't made a typo on the longname of my Data.fs file, but all seems ok. I also saw that the modification time of Data.fs.lock and Data.fs.tmp were set to the time I run db=ZODB.DB(....... so I guess I chose the right Data.fs file. Can someone tell me where am I wrong? Thanks
Oscar Picasso wrote:
HI,
In the python interpreter I have done the following things:
import sys, ZODB, ZODB.FileStorage db = ZODB.DB(ZODB.FileStorage('/usr/local/zope/zope214/Data.fs'))
Shouldn't there be /var/ here? ^^^^
root=db.open().root()
Where 'Data.fs' is my Zope DB with a lot of stuff. Then I did the following things:
root.__dict__ {} #result of the previous "command" dir(root) [] #result of the previous "command" vars(root) {'container' : {}} #result of the previous "command"
All of the above work for me when pointing to the right file. -Michel
On Thu, 09 Mar 2000, Michel Pelletier wrote:
Oscar Picasso wrote:
HI,
In the python interpreter I have done the following things:
import sys, ZODB, ZODB.FileStorage db = ZODB.DB(ZODB.FileStorage('/usr/local/zope/zope214/Data.fs'))
Shouldn't there be /var/ here? ^^^^
-----------------------^ Thanks. That was the problem. I persevered in my mistake because I saw 'Data.fs' in my zope folder (probably created by my own mistake). I try to understand the ZODB because i want to process some data in my ZODB with python. Do you it is the right way to do it?
participants (2)
-
Michel Pelletier -
Oscar Picasso