Thanks for the recipe. Things in 2.7 have changed significantly and to load the ZODB takes a little bit more work. This link http://mail.zope.org/pipermail/zope-dev/2003-August/020283.html has a recipe that shows how to do it. I found with 2.7.0b1 you must ignore the last 2 lines referencing *dropPrivileges*. --mike
On Fri, Aug 08, 2003 at 10:23:58AM -0400, Michael Long wrote:
Hi,
Is there a recipe/product that will load the ZODB as well as the zope environment from within the python interpreter? I would like to be able to play/test with a product that I am creating from within the
interpreter.
IIRC things have changed somehow for zope 2.7, but for zope <= 2.6 you can do this:
pw@kermit Zope-2.6.1-src $ export PYTHONPATH=lib/python/ pw@kermit Zope-2.6.1-src $ python Python 2.2.3 (#1, Jul 22 2003, 12:28:47) [GCC 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import Zope app = Zope.app() # this takes a few seconds app.objectIds() ['acl_users', 'Control_Panel', 'standard_html_header', 'standard_html_footer', 'standard_error_message', 'index_html', 'temp_folder', 'browser_id_manager', 'session_data_manager', 'Examples', 'error_log', 'standard_template.pt']
--
Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE TENSILE AARDVARK! (random hero from isometric.spaceninja.com)
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )