[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/Browser - Debug.py:NONE

Jim Fulton jim@zope.com
Thu, 24 Oct 2002 11:37:03 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/Browser
In directory cvs.zope.org:/tmp/cvs-serv28684/lib/python/Zope/App/ZopePublication/Browser

Removed Files:
	Debug.py 
Log Message:
Added a facility to make it easy to get to Zope 3 from a Python 
prompt. Also added rudimentary debugging support.

>From lib/python (or with lib/python in your Python path), start Python
and:

  from Zope.App import Application

  # Create an Application object
  app = Application('../../Data.fs', '../../site.zcml')

to get the applicatiuon root object on an open database connection,
call the application object:

  root = app()

to execute a request for a path:

  app.debug(path)

You can pass various extra parameters to debug to specify environment
variables and so on. (For now, see lib/python/Zope/App/_app.py.)

To prevent exceptions from being caught, provide the pm keyword
argument:

  app.debug(path, pm=1)

This will let you do pdb post-mortem debugging of errors.

Added a little bit of framework for site initialization, so that the
debugging environment and z3.py use the same initialization code.


=== Removed File Zope3/lib/python/Zope/App/ZopePublication/Browser/Debug.py ===