[Zope] configuring Pythonwin for "import Zope"

Florent Guillaume fg@nuxeo.com
Wed, 31 Jul 2002 17:03:59 +0000 (UTC)


Jeff Kowalczyk <jtk@yahoo.com> wrote:
> > - cd to your Zope's lib/python directory
> > - invoke python (the version that you compiled Zope with)
> > - at the interactive prompt type "import Zope"
> 
> This has been such a useful tip. I've spent the better part of two days
> poking around in python console learning a lot more about python and Zope's
> objects than I did trying to make products with edit-refresh-traceback
> cycles. The mistakes I was making with with import and from import jump out
> at you right away. Great stuff.

Even better, you can do

import Zope
root = Zope.app()
print root.objectIds()
f = root.myfolder
print f.objectIds()
# etc.
get_transaction().commit() # to save your changes if you made some.


Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com