[Zope3-Users] Access to persistent Zope tables/classes in ZODB
Jim Fulton
jim at zope.com
Sat Oct 28 08:30:34 EDT 2006
Rob J Goedman wrote:
> Thanks Jim,
>
> I had gotten to the following point (although you have now shown
> me a better way to get there, I was using FileStorage):
>
> <ZODB.DB.DB object at 0x137e910>
> {'Application': <zope.app.folder.folder.Folder object at 0x1377d70>,
> 'zope.app.generations': <persistent.dict.PersistentDict object at
> 0x1377db0>}
> <zope.app.folder.folder.Folder object at 0x1377d70>
> <OOBTreeItems object at 0x1386228>
>
> print f1[0].keys()[1]
> Rob's buddies
> print f1[0].values()[1]
> <buddydemo.buddy.BuddyFolder object at 0x1377f30>
> print f1[0].values()[1].__getitem__
> <bound method BuddyFolder.__getitem__ of
> <buddydemo.buddy.BuddyFolder object at 0x1377f30>>
I don't know what to make of the above without any context.
That's fine, because I don't really have time to study any specifics.
> This is where I get stuck. Been going over the sources to figure out how
> to iterate over these.
Understand that this has nothing to do with ZODB. Whatever
application objects you use provide whatever api they do
indepenent of ZODB.
...
> I did notice since I did this, bin/runzope acts differently (on this
> Zope/ZODB?).
Differently than what? In any case, I suggested that you use zopectl.
runzope is an internal implementation detail of zopectl.
> I created a new instance in 121
> and transferred all applications and the new instance works fine:
>
> Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$ cd ../121/
> Robs-Laptop:~/Projects/Zope/Zope3/121 rob$ runzope
> ------
> 2006-10-27T14:45:57 INFO root -- HTTP:localhost:9090 Server started.
> Hostname: localhost
> Port: 9090
> ------
> 2006-10-27T14:45:57 INFO root Startup time: 9.072 sec real, 8.710 sec CPU
> ^C
>
> But the old instance in One2One now just seem to test:
>
> Robs-Laptop:~/Projects/Zope/Zope3/121 rob$ cd ../One2One/
> Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$ runzope
> ------
> 2006-10-27T14:47:56 WARNING root Developer mode is enabled: this is a
> security risk and should NOT be enabled on production servers. Developer
> mode can be turned off in etc/zope.conf
> Total: 0 tests, 0 failures, 0 errors
> Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$
>
> Any idea what causes this?
No, I have no context to begin to understand it. I don't know what
121 and One2One are.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-users
mailing list