[Checkins] SVN: Sandbox/mlundwall/introspector.zope3/trunk/ checking in buildout

Martin Lundwall martin at webworks.se
Tue Jun 17 16:47:33 EDT 2008


Log message for revision 87468:
  checking in buildout

Changed:
  A   Sandbox/mlundwall/introspector.zope3/trunk/apidoc.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/bootstrap/
  A   Sandbox/mlundwall/introspector.zope3/trunk/bootstrap/bootstrap.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/bootstrap.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/buildout.cfg
  A   Sandbox/mlundwall/introspector.zope3/trunk/debug.ini
  A   Sandbox/mlundwall/introspector.zope3/trunk/deploy.ini
  A   Sandbox/mlundwall/introspector.zope3/trunk/setup.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/site.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/EXTERNALS.txt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/__init__.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/configure.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/ftesting.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/startup.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/testing.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/CHANGES.txt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/LICENSE.txt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/README.txt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/apidoc.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/bootstrap/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/bootstrap/bootstrap.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/buildout.cfg
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/debug.ini
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/deploy.ini
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/setup.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/site.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/__init__.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/README.txt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/__init__.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/adapters.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/__init__.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/adapter.pt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/configure.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/handler.pt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspector.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorbrowse_view.pt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorview.pt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.css
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.js
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/utils.pt
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/configure.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/ftesting.zcml
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/interfaces.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/registry.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/testing.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/__init__.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/test_componentInterfaces.py
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zdaemon.conf
  A   Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zope.conf
  A   Sandbox/mlundwall/introspector.zope3/trunk/zdaemon.conf
  A   Sandbox/mlundwall/introspector.zope3/trunk/zope.conf

-=-
Added: Sandbox/mlundwall/introspector.zope3/trunk/apidoc.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/apidoc.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/apidoc.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,13 @@
+<configure xmlns="http://namespaces.zope.org/zope">
+  <include package="zope.app.zcmlfiles" file="meta.zcml" />
+  <include package="zope.app.preference" file="meta.zcml" />
+  <include package="zope.app.apidoc" file="meta.zcml" />
+  <include package="zope.app.onlinehelp" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.tree" />
+  <include package="zope.app.onlinehelp" />
+  <include package="zope.app.renderer" />
+  <include package="zope.app.preference" />
+  <include package="zope.app.apidoc" />
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/bootstrap/bootstrap.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/bootstrap/bootstrap.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/bootstrap/bootstrap.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,62 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 78 2008-06-11 10:42:54Z lregebro $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+    import pkg_resources
+
+if sys.platform == 'win32':
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws  = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, quote (sys.executable),
+    '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)

Added: Sandbox/mlundwall/introspector.zope3/trunk/bootstrap.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/bootstrap.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/bootstrap.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,62 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 85041 2008-03-31 15:57:30Z andreasjung $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+    import pkg_resources
+
+if sys.platform == 'win32':
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws  = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, quote (sys.executable),
+    '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)

Added: Sandbox/mlundwall/introspector.zope3/trunk/buildout.cfg
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/buildout.cfg	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/buildout.cfg	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,24 @@
+[buildout]
+develop = . src/zope.introspector
+parts = app test
+find-links = http://download.zope.org/distribution/
+newest = false
+# eggs will be installed in the default buildout location
+# (see ~/.buildout/default.cfg)
+
+[app]
+recipe = zc.recipe.egg
+eggs = introspector.zope3
+       zope.introspector
+       zope.app.apidoc
+       zope.app.securitypolicy
+       z3c.evalexception>=2.0
+       Paste
+       PasteScript
+       PasteDeploy
+interpreter = python
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zope.introspector
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Added: Sandbox/mlundwall/introspector.zope3/trunk/debug.ini
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/debug.ini	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/debug.ini	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,13 @@
+[filter-app:main]
+# Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
+# on the console:
+use = egg:z3c.evalexception#ajax
+next = zope
+
+[app:zope]
+use = egg:introspector.zope3
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080

Added: Sandbox/mlundwall/introspector.zope3/trunk/deploy.ini
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/deploy.ini	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/deploy.ini	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,7 @@
+[app:main]
+use = egg:introspector.zope3
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080

Added: Sandbox/mlundwall/introspector.zope3/trunk/setup.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/setup.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/setup.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,58 @@
+from setuptools import setup, find_packages
+
+setup(name='introspector.zope3',
+
+      # Fill in project info below
+      version='0.1',
+      description="",
+      long_description="",
+      keywords='',
+      author='',
+      author_email='',
+      url='',
+      license='',
+      # Get more from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python',
+                   'Environment :: Web Environment',
+                   'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
+                   'Framework :: Zope3',
+                   ],
+
+      packages=find_packages('src'),
+      package_dir = {'': 'src'},
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=['setuptools',
+                        'ZODB3',
+                        'ZConfig',
+                        'zdaemon',
+                        'zope.publisher',
+                        'zope.traversing',
+                        'zope.app.wsgi>=3.4.0',
+                        'zope.app.appsetup',
+                        'zope.app.zcmlfiles',
+                        # The following packages aren't needed from the
+                        # beginning, but end up being used in most apps
+                        'zope.annotation',
+                        'zope.copypastemove',
+                        'zope.formlib',
+                        'zope.i18n',
+                        'zope.app.authentication',
+                        'zope.app.session',
+                        'zope.app.intid',
+                        'zope.app.keyreference',
+                        'zope.app.catalog',
+                        # The following packages are needed for functional
+                        # tests only
+                        'zope.testing',
+                        'zope.app.testing',
+                        'zope.app.securitypolicy',
+                        ],
+      entry_points = """
+      [console_scripts]
+      introspectorzope3-debug = introspectorzope3.startup:interactive_debug_prompt
+      introspectorzope3-ctl = introspectorzope3.startup:zdaemon_controller
+      [paste.app_factory]
+      main = introspectorzope3.startup:application_factory
+      """
+      )

Added: Sandbox/mlundwall/introspector.zope3/trunk/site.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/site.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/site.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,44 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="introspectorzope3">
+
+  <include package="introspectorzope3" />
+
+  <!-- Remove this reference to disable the APIDoc tool.
+       You should do this for production -->
+  <include file="apidoc.zcml" />
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+  <include package="zope.app.securitypolicy" />
+  <securityPolicy 
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <unauthenticatedPrincipal id="zope.anybody"
+                            title="Unauthenticated User" />
+  <unauthenticatedGroup id="zope.Anybody"
+                        title="Unauthenticated Users" />
+  <authenticatedGroup id="zope.Authenticated"
+                      title="Authenticated Users" />
+  <everybodyGroup id="zope.Everybody"
+                  title="All Users" />
+
+  <!-- Initial administrator account.  Disable this for production -->
+  <principal id="zope.manager"
+             title="Manager"
+             login="admin"
+             password_manager="Plain Text"
+             password="admin"
+             />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+         principal="zope.Anybody" />
+  <grant permission="zope.app.dublincore.view"
+         principal="zope.Anybody" />
+  
+  <role id="zope.Manager" title="Site Manager" />
+  <role id="zope.Member" title="Site Member" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager"
+         principal="zope.manager" />
+
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/EXTERNALS.txt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/EXTERNALS.txt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/EXTERNALS.txt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1 @@
+zope.introspector https://betahaus.org/svn/martin/zope.introspector/trunk

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/__init__.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/__init__.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/__init__.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1 @@
+# Make this directory a package

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/configure.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/configure.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/configure.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,29 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="introspectorzope3">
+
+  <include package="zope.security" file="meta.zcml" />
+  <include package="zope.app.zcmlfiles" file="meta.zcml" />
+
+  <include package="zope.publisher" />
+  <include package="zope.traversing" />
+  <include package="zope.traversing.browser" />
+  <include package="zope.app.zcmlfiles" />
+
+  <!-- The following packages aren't needed from the beginning, but
+       end up being used in most applications -->
+  <include package="zope.i18n" file="meta.zcml" />
+  <include package="zope.annotation" />
+  <include package="zope.copypastemove" />
+  <include package="zope.formlib" />
+  <include package="zope.i18n.locales" />
+  <include package="zope.app.authentication" />
+  <include package="zope.app.session" />
+  <include package="zope.app.intid" />
+  <include package="zope.app.keyreference" />
+  <include package="zope.app.catalog" />
+
+  <!-- Add your own component registrations here -->
+  
+  <include package="zope.introspector" />
+
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/ftesting.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/ftesting.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/ftesting.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,50 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:meta="http://namespaces.zope.org/meta"
+           i18n_domain="introspectorzope3">
+
+  <!-- Turn on the devmode -->
+  <meta:provides feature="devmode" />
+  <include package="introspectorzope3" />
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+  <include package="zope.app.securitypolicy" />
+  <securityPolicy 
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <!-- Test Principals -->
+
+  <unauthenticatedPrincipal id="zope.anybody"
+                            title="Unauthenticated User" />
+  <unauthenticatedGroup id="zope.Anybody"
+                        title="Unauthenticated Users" />
+  <authenticatedGroup id="zope.Authenticated"
+                      title="Authenticated Users" />
+  <everybodyGroup id="zope.Everybody"
+                  title="All Users" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw"
+      />
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw"
+      />
+
+  <grant permission="zope.View"
+         principal="zope.Anybody" />
+  <grant permission="zope.app.dublincore.view"
+         principal="zope.Anybody" />
+
+  <role id="zope.Manager" title="Site Manager" />
+  <role id="zope.Member" title="Site Member" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/startup.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/startup.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/startup.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,35 @@
+import os
+import sys
+import code
+import zdaemon.zdctl
+import zope.app.wsgi
+import zope.app.debug
+
+def application_factory(global_conf, conf='zope.conf'):
+    zope_conf = os.path.join(global_conf['here'], conf)
+    return zope.app.wsgi.getWSGIApplication(zope_conf)
+
+def interactive_debug_prompt(zope_conf='zope.conf'):
+    db = zope.app.wsgi.config(zope_conf)
+    debugger = zope.app.debug.Debugger.fromDatabase(db)
+    # Invoke an interactive interpreter shell
+    banner = ("Welcome to the interactive debug prompt.\n"
+              "The 'root' variable contains the ZODB root folder.\n"
+              "The 'app' variable contains the Debugger, 'app.publish(path)' "
+              "simulates a request.")
+    code.interact(banner=banner, local={'debugger': debugger,
+                                        'app':      debugger,
+                                        'root':     debugger.root()})
+
+class ControllerCommands(zdaemon.zdctl.ZDCmd):
+
+    def do_debug(self, rest):
+        interactive_debug_prompt()
+
+    def help_debug(self):
+        print "debug -- Initialize the application, providing a debugger"
+        print "         object at an interactive Python prompt."
+
+def zdaemon_controller(zdaemon_conf='zdaemon.conf'):
+    args = ['-C', zdaemon_conf] + sys.argv[1:]
+    zdaemon.zdctl.main(args, options=None, cmdclass=ControllerCommands)

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/testing.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/testing.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/introspectorzope3/testing.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,21 @@
+import os.path
+from zope.testing import doctest
+from zope.app.testing import functional
+
+ftesting_zcml = os.path.join(os.path.dirname(__file__), 'ftesting.zcml')
+FunctionalLayer = functional.ZCMLLayer(ftesting_zcml, __name__,
+                                       'FunctionalLayer')
+
+def FunctionalDocTestSuite(module=None, **kw):
+    module = doctest._normalize_module(module)
+    suite = functional.FunctionalDocTestSuite(module, **kw)
+    suite.layer = FunctionalLayer
+    return suite
+
+def FunctionalDocFileSuite(path, **kw):
+    suite = functional.FunctionalDocFileSuite(path, **kw)
+    suite.layer = FunctionalLayer
+    return suite
+
+class FunctionalTestCase(functional.FunctionalTestCase):
+    layer = FunctionalLayer

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/CHANGES.txt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/CHANGES.txt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/CHANGES.txt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,10 @@
+CHANGES
+*******
+
+0.1 (unreleased)
+================
+
+Feature changes
+---------------
+
+* Initial Release

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/LICENSE.txt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/LICENSE.txt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/LICENSE.txt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,54 @@
+Zope Public License (ZPL) Version 2.1
+-------------------------------------
+
+A copyright notice accompanies this license document that
+identifies the copyright holders.
+
+This license has been certified as open source. It has also
+been designated as GPL compatible by the Free Software
+Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions in source code must retain the
+   accompanying copyright notice, this list of conditions,
+   and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying
+   copyright notice, this list of conditions, and the
+   following disclaimer in the documentation and/or other
+   materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to
+   endorse or promote products derived from this software
+   without prior written permission from the copyright
+   holders.
+
+4. The right to distribute this software or to use it for
+   any purpose does not give you the right to use
+   Servicemarks (sm) or Trademarks (tm) of the copyright
+   holders. Use of them is covered by separate agreement
+   with the copyright holders.
+
+5. If any files are modified, you must cause the modified
+   files to carry prominent notices stating that you changed
+   the files and the date of any change.
+
+Disclaimer
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+  AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+  NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+  NO EVENT SHALL THE COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+  DAMAGE.

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/README.txt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/README.txt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/README.txt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,59 @@
+zope.introspector
+*****************
+
+What is zope.introspector?
+==========================
+
+`zope.introspector` helps developers to get information about objects
+in their Zope/Python runtime environment.
+
+It provides an easy to use API that enables developers to create
+'object descriptors' for any object and is usable in almost every Zope
+environment, namely Zope 2, Zope 3 and Plone. Although
+`zope.introspector` is mainly tested with Python 2.4, also Python 2.5
+installs should work.
+
+`zope.introspector` is extensible. That means, that you can write your
+own descriptors for certain types of objects or aspects
+thereof. Please see the detailed documentation in
+'src/zope/introspector' to learn more about that.
+
+The package does not provide viewing components. Instead you can use
+packages, that are built on top of `zope.introspector`. These provide
+viewing components, that apply to more specific frameworks like Plone
+or Grok.
+
+Installing zope.introspector
+============================
+
+`zope.introspector` is provided as an Python egg on cheeseshop and set
+up via `zc.buildout`_
+
+.. _zc.buildout: http://cheeseshop.python.org/pypi/zc.buildout
+
+You may have setuptools already installed for your system Python. In
+that case, you may need to upgrade it first because buildout requires
+a very recent version::
+
+    $ sudo easy_install -U setuptools
+
+If this command fails because easy_install is not available, there is
+a good chance you do not have setuptools available for your system
+Python. If so, there is no problem because setuptools will be
+installed locally by buildout.
+
+Because `zope.introspector` is a developer tool, you normally use it
+by including the package the `setup.py` file of your own
+package. There will most probably a section called `install_requires`
+where you add 'zope.introspector' like this::
+
+      ...
+      install_requires=['setuptools',
+                        # Add extra requirements here
+                        'zope.introspector',
+                        ...
+                        ],
+
+In `zc.buildout` based package setups you can 'activate' usage of
+`zope.introspector` afterwards simply by (re)running `bin/buildout`.
+

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/apidoc.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/apidoc.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/apidoc.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,13 @@
+<configure xmlns="http://namespaces.zope.org/zope">
+  <include package="zope.app.zcmlfiles" file="meta.zcml" />
+  <include package="zope.app.preference" file="meta.zcml" />
+  <include package="zope.app.apidoc" file="meta.zcml" />
+  <include package="zope.app.onlinehelp" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.tree" />
+  <include package="zope.app.onlinehelp" />
+  <include package="zope.app.renderer" />
+  <include package="zope.app.preference" />
+  <include package="zope.app.apidoc" />
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/bootstrap/bootstrap.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/bootstrap/bootstrap.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/bootstrap/bootstrap.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,62 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 85041 2008-03-31 15:57:30Z andreasjung $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+    import pkg_resources
+
+if sys.platform == 'win32':
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws  = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, quote (sys.executable),
+    '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/buildout.cfg
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/buildout.cfg	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/buildout.cfg	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,23 @@
+[buildout]
+develop = .
+parts = app test
+find-links = http://download.zope.org/distribution/
+newest = false
+# eggs will be installed in the default buildout location
+# (see ~/.buildout/default.cfg)
+
+[app]
+recipe = zc.recipe.egg
+eggs = zope3app
+       zope.app.apidoc
+       zope.app.securitypolicy
+       z3c.evalexception>=2.0
+       Paste
+       PasteScript
+       PasteDeploy
+interpreter = python
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zope.introspector
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/debug.ini
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/debug.ini	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/debug.ini	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,13 @@
+[filter-app:main]
+# Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
+# on the console:
+use = egg:z3c.evalexception#ajax
+next = zope
+
+[app:zope]
+use = egg:zope3app
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/deploy.ini
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/deploy.ini	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/deploy.ini	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,7 @@
+[app:main]
+use = egg:zope3app
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/setup.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/setup.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/setup.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,72 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup for zope.introspector package
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version = '0.1'
+
+setup(name='zope.introspector',
+      version=version,
+      description="Introspection helpers for Zope and Python objects.",
+      long_description=(
+        read('README.txt')
+          + '\n\n' +
+          'Detailed Documentation\n' +
+          '**********************\n\n'
+          + '\n\n' +
+          read('src', 'zope', 'introspector', 'README.txt')
+          + '\n\n' +
+          read('CHANGES.txt')
+          ),
+      # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=[
+        'Development Status :: 1 - Planning',
+        'Environment :: Web Environment',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: Zope Public License',
+        'Programming Language :: Python',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Topic :: Internet :: WWW/HTTP',
+        'Framework :: Zope3',
+        ],
+      keywords="zope zope2 zope3 web introspection introspector",
+      author="Zope Corporation and Contributors",
+      author_email="zope3-dev at zope.org",
+      url="http://cheeseshop.python.org/pypi/zope.introspector",
+      license="ZPL 2.1",
+      package_dir={'': 'src'},
+      packages=find_packages('src'),
+      namespace_packages = ['zope'],
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=['setuptools',
+                        'grokcore.component',
+                        # Add extra requirements here
+                        ],
+      extras_require = dict(
+        test=['zope.app.testing',
+              'zope.testing',]
+      ),
+      entry_points="""
+      # Add entry points here
+      """,
+      )

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/site.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/site.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/site.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,44 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="zope3app">
+
+  <include package="zope3app" />
+
+  <!-- Remove this reference to disable the APIDoc tool.
+       You should do this for production -->
+  <include file="apidoc.zcml" />
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+  <include package="zope.app.securitypolicy" />
+  <securityPolicy 
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <unauthenticatedPrincipal id="zope.anybody"
+                            title="Unauthenticated User" />
+  <unauthenticatedGroup id="zope.Anybody"
+                        title="Unauthenticated Users" />
+  <authenticatedGroup id="zope.Authenticated"
+                      title="Authenticated Users" />
+  <everybodyGroup id="zope.Everybody"
+                  title="All Users" />
+
+  <!-- Initial administrator account.  Disable this for production -->
+  <principal id="zope.manager"
+             title="Manager"
+             login="admin"
+             password_manager="Plain Text"
+             password="admin"
+             />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+         principal="zope.Anybody" />
+  <grant permission="zope.app.dublincore.view"
+         principal="zope.Anybody" />
+  
+  <role id="zope.Manager" title="Site Manager" />
+  <role id="zope.Member" title="Site Member" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager"
+         principal="zope.manager" />
+
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/__init__.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/__init__.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/__init__.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,7 @@
+# namespace package boilerplate
+try:
+    import pkg_resources
+    pkg_resources.declare_namespace(__name__)
+except ImportError, e:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/README.txt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/README.txt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/README.txt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,299 @@
+zope.introspector
+**********************
+
+:Test-Layer: unit
+
+The `zope.introspector` package provides an extensible framework
+for retrieving 'data' on 'entities'. It makes use of
+grokcore.component for registration of adapters and utilities.
+
+'Entitity' in that respect means everything, that is descriptable by a
+name in Python or everything, that can be passed to a method. In other
+words: if you can pass something to a callable, then the introspector
+should be able to give you some information about it.
+
+'Data' in that respect means a container containing a set of data,
+describing the given entity. The container might contain primitive
+values (like numbers or strings) as well as more complex objects,
+callables etc.
+
+In plain words: Giving a certain object you get a dataset describing
+it.
+
+Support for modification of objects (for instance for debugging
+purposes) is still not implemented. This package also does not include
+viewing components to display the results.
+
+Describing objects
+==================
+
+Simpe objects
+-------------
+
+Simple objects are considered the primitive types provided by Python
+as simple numbers, strings, classes etc. As in a way every thing in
+Python can be seen as a simple object, the ``ObjectInfo`` can handle
+every type of object although the delivered data might lack special
+aspects of more complicated objects.
+
+To handle more comlex objects, there are extended versions of
+``ObjectInfo`` available with zope.introspector that we will discuss
+below and you can write your own ones.
+
+The plain base of all object descriptions generated by
+zope.introspector is the ``ObjectInfo`` class. ObjectInfos can be
+created by passing an object to examine::
+
+   >>> from zope.introspector import ObjectInfo
+   >>> info = ObjectInfo(object())
+   >>> info
+   <zope.introspector.ObjectInfo object at 0x...>
+
+ObjectInfos provide the IObjectInfo interface::
+
+   >>> from zope.introspector.interfaces import IObjectInfo
+   >>> IObjectInfo.providedBy(info)
+   True
+
+We can retrieve basal information about any object with ObjectInfos::
+
+   >>> info.getType()
+   <object object at 0x...>
+
+Other methods include such which are provided by the Python
+``inspect`` package like ``isModule()``, ``isClass()``,
+``getMembers()``, etc.::
+
+   >>> info.isModule()
+   False
+
+   >>> info.isClass()
+   False
+
+Note, that the implementations of this methods in ``zope.introspector``
+might vary from those of the ``inspect`` package.
+
+As we are speaking about aspects of objects, we can say that every
+Python object is covered by IObjectInfo, as it provides information,
+that is available with every object regardless of as complex it may
+be.
+
+
+More complex objects
+--------------------
+
+Describing more complex objects in terms of ``zope.introspector``
+means to deliver information about certain aspects of those objects,
+that are not covered by the basic ``IObjectInfo`` interface.
+
+As an example we require from the introspector to deliver on request a
+list of local .txt files if an object turns out to be a Python
+package. This will fail with the standard ``ObjectInfo``::
+
+   >>> from zope.introspector.tests import subpkg
+   >>> info = ObjectInfo(subpkg)
+   >>> info.getPackageFiles(filter='.txt')
+   Traceback (most recent call last):
+   ...
+   AttributeError: 'ObjectInfo' object has no attribute 'getPackageFiles'
+
+Fortunately, there is an ``PackageInfo`` available, which gives us
+this information::
+
+   >>> from zope.introspector import PackageInfo
+   >>> info = PackageInfo(subpkg)
+   >>> info.getPackageFiles(filter='.txt')
+   ['README.txt']
+
+
+Getting specialized descriptors
+===============================
+
+Overall, the ...Info classes act as descriptors of objects. Doing::
+
+   info = ObjectInfo(obj)
+
+means to generate a descriptor of the object `obj`.
+
+
+Getting a specialist based on the object type
+---------------------------------------------
+
+It would, however, be nice to let the Zope framework look up a
+suitable descriptor or 'specialist' for us more automatically. This is
+in fact possible, using Zope adapters.
+
+To demonstrate the usage of this, we first have to register the
+adapters and utilities of ``zope.introspector``::
+
+   >>> import grokcore.component
+   >>> grokcore.component.testing.grok('zope.introspector')
+
+Now we want to get an descriptor (aka Info object) for a module::
+
+   >>> from zope.introspector.testing import samplemod
+   >>> from zope.introspector.interfaces import IObjectInfo
+   >>> info = IObjectInfo(samplemod)
+   >>> info
+   <zope.introspector.ModuleInfo object at 0x...>
+
+Apparently we got a specialized descriptor here, ``ModuleInfo``
+instead of a plain ``ObjectInfo``.
+
+This is, because modules provide a special type and our framework
+offers a specialized adapter for this type.
+
+We therefore can define 'specialists' for any type of object, as long
+as the Python type is really different.
+
+
+Getting a specialist based on the descriptor interface
+------------------------------------------------------
+
+Things become more complicated when it comes to different kinds of
+objects, that do not differ in the implemented interfaces and Python
+types. 
+
+A use case would be to require different descriptors for packages and
+modules. As packages are modules and both are of the same type for
+Python, we cannot define a specialized adapter based on the type::
+
+   >>> from zope.introspector.tests import subpkg
+   >>> IObectInfo(subpkg)
+   <zope.introspector.ModuleInfo object at 0x...>
+
+That's okay in the sense, that packages are in fact modules, but there
+is an even better descriptor called `PackageInfo`, that provides us
+with data covering the package-specific aspects of `subpkg`. 
+
+To get this specialized package descriptor, we can construct a
+``PackageInfo`` object directly::
+
+   >>> from zope.introspector import PackageInfo
+   >>> info = PackageInfo(subpkg)
+
+or lookup its special interface, for which an adapter should be
+registered:: 
+
+   >>> from zope.introspector.interfaces import IPackageInfo
+   >>> info = IPackageInfo(subpkg)
+   >>> info.getPackageFiles(filter='.txt')
+   ['README.txt']
+
+
+Extending the introspector.core
+===============================
+
+Definition of additional descriptors for zope.introspector can be done
+using adapters and interfaces.
+
+
+Writing an adapter for new types
+--------------------------------
+
+Descriptors might inherit from zope.introspector.ObjectInfo. We
+define a new kind of object, for which we want to provide extra
+information::
+
+   >>> class Cave(object):
+   ...     space=12 # The space in squarefeet
+
+If we look up this class via adapters, we get a type descriptor::
+
+   >>> from zope.introspector.interfaces import IObjectInfo
+   >>> IObjectInfo(Cave)
+   <zope.introspector.TypeInfo object at 0x...>
+
+For objects of this class a class descriptor will be found with stock
+zope.introspector::
+
+   >>> IObjectInfo(Cave())
+   <zope.introspector.ClassInfo object at 0x...>
+
+Let's now build a descriptor, that describes ``Cave`` objects,
+i.e. instances of ``Cave``::
+
+   >>> class CaveInfo(ObjectInfo):
+   ...     grok.component.context(Cave)
+   ...     grok.component.provides(IObjectInfo)
+   ...     def getSpace(self):
+   ...          return context.space
+
+The g.c.provides() statement is not really needed here, because it
+will be inherited from ObjectInfo. But this way we make clear, that
+this class defines an adapter, that adapts Caves to IObjectInfo.
+
+Before we can use the new adapter, we must register it::
+
+   >>> grokcore.component.grok_component('CaveInfo', CaveInfo)
+   True
+
+   >>> IObjectInfo(Cave())
+   <CaveInfo object at 0x...>
+
+Note, that for the ``Cave`` *class* we will still get the same adapter
+as before::
+
+   >>> IObjectInfo(Cave)
+   <zope.introspector.ClassInfo object at 0x...>
+
+
+Writing an interface to cover aspects of an adapted type
+--------------------------------------------------------
+
+Imagine now, that for introspection purposes we want to distuingish
+between plain caves and large caves. Large caves are considered those,
+that have space of more than 20 squarefeet.
+
+Apparently, large caves are also caves which is reflected by the fact,
+that a ``Cave`` object with a ``space`` value greater than 20 is still
+a ``Cave`` object. Large caves and simple caves are of the same type.
+
+This means, that we cannot separate both kinds of cave by looking up
+their types or interfaces. We could indeed define a new interface for
+large caves, but in real life we will see lots of objects for which we
+cannot easily define an interface afterwards. 
+
+Just think of packages and modules. While packages *are* also modules,
+they have some interesting extra data to provide like a list of
+contained .txt files, subpackages etc., which plain modules do not
+have.
+
+In other words: packages are modules that provide an additional
+aspect.
+
+While we cannot easily bind those objects with additional aspects to
+an interface, we can define at least a different interface for the
+expected data. This allows us also to get the additional data by
+looking up adapters.
+
+We define a new interface for large caves::
+
+   >>> from zope.interface import Interface
+   >>> class ILargeCaveInfo(Interface):
+   ...     """Just a marker interface."""
+
+We do not need more than a marker here. This means, that in fact every
+object implements ``ILargeCaveInfo`` but we use it only to register
+and lookup adapters.
+
+We define and register an adapter, that provides special infos about large
+caves:: 
+
+   >>> class LargeCaveInfo(grok.component.Adapter):
+   ...     grok.component.provides(ILargeCaveInfo)
+   ...     grok.component.context(Cave)
+
+   >>> grokcore.component.grok_component(
+   ...    'LargeCaveInfo', LargeCaveInfo)
+   True
+
+Now we can lookup this adapter asking for the new interface
+``ILargeCaveInfo`` instead of ``IObjectInfo``::
+
+   >>> ILargeCaveInfo(cave)
+   <LargeCaveInfo object at 0x...>
+
+We indicate by this call, that we do not want the normal set of
+information regarding caves, but the special information that is
+provided by large caves only.

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/__init__.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/__init__.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/__init__.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Initialize zope.introspector package.
+
+$Id$
+"""

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/adapters.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/adapters.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/adapters.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,107 @@
+from zope.interface import implements
+from zope.component import adapts
+from zope.introspector.interfaces import IRegistrySearch
+from zope.component.interfaces import IAdapterRegistration,IHandlerRegistration, IUtilityRegistration
+
+class AdapterSearch(object):
+    implements(IRegistrySearch)
+    adapts(IAdapterRegistration)
+
+    def __init__(self, registration):
+        self.registration = registration
+        
+    def searchRegistration(self, string, caseSensitive = False):
+        
+        if string in getattr(self.registration.provided, '__name__', ''):
+            return True
+        elif string in self.registration.name:
+            return True
+        elif string in getattr(self.registration.factory, '__name__', ''):
+            return True
+#        elif string in self.registration.info:
+#            return True
+        else:
+            for each in self.registration.required:
+                if string in getattr(each, '__name__'):
+                    return True
+        return False
+    
+    def getInterfaces(self):
+        interfaces = []
+        for each in list(self.registration.required) + [self.registration.provided]:
+            module = getattr(each, '__module__')
+            name = getattr(each, '__name__')
+            if module:
+                name = '%s.%s' % (module,name)
+            interfaces.append(name)
+        return interfaces
+    
+    def getObject(self):
+        return self.registration
+    
+        
+class HandlerSearch(object):
+    implements(IRegistrySearch)
+    adapts(IHandlerRegistration)
+
+    def __init__(self, registration):
+        self.registration = registration
+        
+    def searchRegistration(self, string, caseSensitive = False):
+        
+        if string in self.registration.name:
+            return True
+        elif string in getattr(self.registration.factory, '__name__',''):
+            return True
+#        elif string in self.registration.info:
+#            return True
+        else:
+            for each in self.registration.required:
+                if string in getattr(each, '__name__'):
+                    return True
+        return False
+
+    def getInterfaces(self):
+        interfaces = []
+        for each in list(self.registration.required) + [self.registration.factory]:
+            module = getattr(each, '__module__')
+            name = getattr(each, '__name__')
+            if module:
+                name = '%s.%s' % (module,name)
+            interfaces.append(name)
+        return interfaces
+    
+    def getObject(self):
+        return self.registration
+    
+
+        
+class UtilitySearch(object):
+    implements(IRegistrySearch)
+    adapts(IUtilityRegistration)
+
+    def __init__(self, registration):
+        self.registration = registration
+        
+    def searchRegistration(self, string, caseSensitive = False):
+        
+        if string in getattr(self.registration.provided, '__name__',''):
+            return True
+        elif string in self.registration.name:
+            return True
+#        elif string in self.registration.info:
+#            return True
+        return False
+
+    def getInterfaces(self):
+        interfaces = []
+        module = getattr(self.registration.provided, '__module__')
+        name = getattr(self.registration.provided, '__name__')
+        if module:
+            name = '%s.%s' % (module,name)
+        interfaces.append(name)
+        return interfaces
+    
+    def getObject(self):
+        return self.registration
+    

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/__init__.py
===================================================================

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/adapter.pt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/adapter.pt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/adapter.pt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,48 @@
+<html i18n:domain="zope">
+<body>
+
+<h3>Adapter: <span tal:content="context/name" /></h3>
+
+<div>
+	<div class="indent" tal:define="factory view/getFactory">
+		<h4>Factory</h4>
+		<ul class="attr-list" tal:condition="factory">
+			<li>
+				<div tal:content="factory" />
+			</li>
+		</ul>
+		<div tal:condition="not:factory">
+			No factory found
+		</div>
+	</div>
+	
+	<div class="indent"
+		tal:define="provided view/getProvidedInterface">
+		<h4>Provided Interface</h4>
+		<ul class="attr-list" tal:condition="provided">
+			<li>
+				<div tal:content="provided" />
+			</li>
+		</ul>
+		<div tal:condition="not:provided">
+			No interface found
+		</div>
+	</div>
+	
+	<div class="indent"
+		tal:define="required view/getRequiredInterfaces">
+		<h4>Required Interfaces</h4>
+		<ul class="attr-list" tal:condition="required">
+			<li tal:repeat="iface required">
+				<a tal:attributes="href string:/@@registry.html/${iface}/@@introspector.html"
+				   tal:content="iface">
+				   zope.interface.Interface
+				   </a>
+			</li>
+		</ul>
+	</div>
+</div>
+<br/>
+
+</body>
+</html>
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/configure.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/configure.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/configure.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,57 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+		   xmlns:browser="http://namespaces.zope.org/browser"
+           i18n_domain="zope.introspector">
+
+ <browser:page
+ 	for="*"
+ 	name="registry.html"
+ 	template="introspectorview.pt"
+ 	permission="zope.app.apidoc.UseAPIDoc"
+ 	class=".introspector.Introspector"
+ 	menu="zmi_views" title="Registry Introspector"
+ 	/>
+
+ <browser:page
+ 	for="*"
+ 	name="registry_browser.html"
+ 	template="introspectorbrowse_view.pt"
+ 	permission="zope.app.apidoc.UseAPIDoc"
+ 	class=".introspector.Introspector"
+ 	/>
+ 	
+ <browser:page
+ 	for="zope.component.interfaces.IAdapterRegistration"
+ 	name="registration.html"
+ 	template="adapter.pt"
+ 	permission="zope.app.apidoc.UseAPIDoc"
+ 	class=".introspector.RegistrationView"
+ 	/>
+
+ <browser:page
+ 	for="zope.component.interfaces.IHandlerRegistration"
+ 	name="registration.html"
+ 	template="handler.pt"
+ 	permission="zope.app.apidoc.UseAPIDoc"
+ 	class=".introspector.RegistrationView"
+ 	/>
+
+ <browser:page
+ 	for="zope.component.interfaces.IUtilityRegistration"
+ 	name="registration.html"
+ 	template="utils.pt"
+ 	permission="zope.app.apidoc.UseAPIDoc"
+ 	class=".introspector.RegistrationView"
+ 	/>
+ 	
+ <browser:resource
+ 	name="mktree.js"
+ 	file="mktree.js"
+ 	/>
+ 	
+ <browser:resource
+ 	name="mktree.css"
+ 	file="mktree.css"
+ 	/> 
+
+ 	
+</configure>
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/handler.pt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/handler.pt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/handler.pt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,48 @@
+<html i18n:domain="zope">
+<body>
+
+<h3>Handler: <span tal:content="view/getName" /></h3>
+
+<div>
+	<div class="indent" tal:define="factory view/getFactory">
+		<h4>Factory</h4>
+		<ul class="attr-list" tal:condition="factory">
+			<li>
+				<div tal:content="factory" />
+			</li>
+		</ul>
+		<div tal:condition="not:factory">
+			No factory found
+		</div>
+	</div>
+	
+<!--	<div class="indent"-->
+<!--		tal:define="provided view/getProvidedInterface">-->
+<!--		<h4>Provided Interface</h4>-->
+<!--		<ul class="attr-list" tal:condition="provided">-->
+<!--			<li>-->
+<!--				<div tal:content="provided" />-->
+<!--			</li>-->
+<!--		</ul>-->
+<!--		<div tal:condition="not:provided">-->
+<!--			No interface found-->
+<!--		</div>-->
+<!--	</div>-->
+	
+	<div class="indent"
+		tal:define="required view/getRequiredInterfaces">
+		<h4>Required Interfaces</h4>
+		<ul class="attr-list" tal:condition="required">
+			<li tal:repeat="iface required">
+				<a tal:attributes="href string:/@@registry.html/${iface}/@@introspector.html"
+				   tal:content="iface">
+				   zope.interface.Interface
+				   </a>
+			</li>
+		</ul>
+	</div>
+</div>
+<br/>
+
+</body>
+</html>
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspector.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspector.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspector.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,115 @@
+from zope.publisher.browser import BrowserView
+from zope.app.zapi import getUtility
+from zope.dottedname import resolve
+from zope.interface import Interface, implements
+from zope.traversing.interfaces import ITraversable
+from zope.traversing.adapters import DefaultTraversable
+from zope.component import adapts
+
+from zope.introspector.interfaces import IRegistryInfo 
+
+class RegistrationView(BrowserView):        
+    """
+    """
+    
+    def _expandPath(self, obj):
+        module = getattr(obj, '__module__')
+        name = getattr(obj, '__name__')
+        if module:
+            name = '%s.%s' % (module,name)
+        return name
+    
+    def getFactory(self):
+        return getattr(self.context.factory, '__name__', '')
+    
+    def getProvidedInterface(self):
+        return self._expandPath(self.context.provided)
+    
+    def getName(self):
+        return self.context.name.split('.')[-1]
+    
+    def getRequiredInterfaces(self):
+        return [self._expandPath(x) for x in self.context.required]
+    
+class Introspector(BrowserView):
+    
+    
+    def getAll(self):
+        return getUtility(IRegistryInfo).getAllInterfaces()
+    
+    def getUtilities(self):
+        return getUtility(IRegistryInfo).getAllUtilities()
+    
+    def getAdapters(self):
+        return getUtility(IRegistryInfo).getAllAdapters()
+    
+    def getHandlers(self):
+        return getUtility(IRegistryInfo).getAllHandlers()
+    
+    def searchRegistry(self):
+        form = self.request.form
+        
+        search = form.get('searchQuery')
+        if not search:
+            return
+        
+        types = []
+        if form.get('adapters'):
+            types.append('adapters')
+        if form.get('utilities'):
+            types.append('utilities')
+        if form.get('handlers'):
+            types.append('handlers')
+        if form.get('subscriptionAdapters'):
+            types.append('subscriptionAdapters')
+        
+        registry = getUtility(IRegistryInfo)
+        return registry.getRegistrationsForInterface(search, types)
+    
+    def generateHTMLTree(self):
+        return '<ul class="mktree" id="treeBrowse">' + self._generator(self.getAll()) + '</ul>'
+    
+    def _generator(self, tree):
+        page = ""
+        tags = {}
+        tags['base_start'] = '<ul>'
+        tags['base_end'] = '</ul>'
+        tags['list_start'] = '<li>'
+        tags['list_end'] = '</li>'
+        
+        if not isinstance(tree, dict):
+            return tree
+        for key in tree.keys():
+            returned = self._generator(tree[key]) 
+            if isinstance(returned, str):
+                # we are still in the dictionary
+                page = page + tags['list_start'] + key
+                page = page + tags['base_start']
+                page = page + returned 
+                page = page + tags['base_end']
+                page = page + tags['list_end']
+            else:
+                # we are at a end node, leaf
+                page = page + tags['list_start'] + key
+                page = page + '<ul class="interfaceList">'
+                
+                if isinstance(returned, list):
+                    for interface in returned:
+                        
+                        page = page + tags['list_start'] + str(interface) + tags['list_end']
+                        #page = page + tags['list_start'] + self.traverse(interface, '@@registration.html')() + tags['list_end']
+                page = page + '</ul>'
+                page = page + tags['list_end']
+        return page
+
+    def publishTraverse(self, request, name):
+        from zope.publisher.interfaces import NotFound
+        try:
+            return super(Introspector, self).publishTraverse(request, name)
+        except NotFound:
+            obj = resolve.resolve(name)
+            from zope.location.location import LocationProxy
+            return LocationProxy(obj, container=self, name=name)
+        
+    
+    
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorbrowse_view.pt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorbrowse_view.pt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorbrowse_view.pt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,39 @@
+<html metal:use-macro="context/@@standard_macros/view"
+    i18n:domain="zope">
+<head>
+<div metal:fill-slot="style_slot">
+
+    <script type="text/javascript" 
+    		src="mktree.js"
+    		tal:attributes="src string:${context/++resource++mktree.js}"
+    		>
+    </script>
+	<style type="text/css"
+           tal:content="string:@import url(${context/++resource++mktree.css});">
+      @import url(mktree.css);
+    </style>
+    
+    </div>
+</head>
+<body>
+<div metal:fill-slot="body">
+
+  <h1 i18n:translate="">
+    Registry Browser:
+  </h1>
+
+
+	<div class="indent"
+       tal:content="structure view/generateHTMLTree">
+
+<!--    <ul class="attr-list" tal:condition="results">-->
+<!--      <li tal:repeat="result results">-->
+<!--        <span tal:content="result" />-->
+<!--      </li>-->
+<!--    </ul>-->
+
+  </div>
+
+</div>
+</body>
+</html>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorview.pt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorview.pt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/introspectorview.pt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,75 @@
+<html metal:use-macro="context/@@standard_macros/view"
+    i18n:domain="zope">
+<body>
+<div metal:fill-slot="body">
+
+  <h1 i18n:translate="">
+    Registry Introspector: <a tal:attributes="href string:${context/@@absolute_url}/@@registry_browser.html">Browse</a>
+  </h1>
+
+<!-- <h2 i18n:translate=""-->
+<!-- tal:define="utils view/getUtilities">-->
+<!-- 	Registered Utilities:-->
+<!-- 	<span tal:content="python:len(utils)">-->
+<!-- 	</span>-->
+<!-- </h2>-->
+
+  <form action="request/URL"
+     tal:attributes="action request/URL"
+     method="post"
+     >
+     
+    <div class="row">
+      <div class="label" i18n:translate="">Search Registry</div>
+      <div class="field">
+        <input type="text" 
+        	   name="searchQuery" 
+        	   size="50"
+        	   tal:attributes="value request/searchQuery | nothing"
+        	   />
+      </div>
+      <div class="field">
+      	Adapters
+	      	<input type="checkbox" 
+	      		   name="adapters"
+	      		   tal:attributes="checked request/adapters | nothing"
+	      		   />
+      	Utilities
+	      	<input type="checkbox" 
+	      		   name="utilities"
+	      		   tal:attributes="checked request/utilities | nothing"
+	      		   />
+      	Handlers
+	      	<input type="checkbox" 
+	      		   name="handlers"
+	      		   tal:attributes="checked request/handlers | nothing"
+	      		   />
+      	Subscription Adapters
+	      	<input type="checkbox" 
+	      		   name="subscriptionAdapters"
+	      		   tal:attributes="checked request/subscriptionAdapters | nothing"
+	      		   />
+      </div>
+    </div>
+
+    <div class="row">
+      <div class="controls">
+        <input type="submit" name="search" value="Search"/>
+      </div>
+    </div>
+  </form>
+
+	<div class="indent"
+       tal:define="results view/searchRegistry">
+
+    <ul class="attr-list" tal:condition="results">
+      <li tal:repeat="result results">
+        <span tal:content="structure result/@@registration.html" />
+      </li>
+    </ul>
+
+  </div>
+
+</div>
+</body>
+</html>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.css
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.css	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.css	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,23 @@
+/* Put this inside a @media qualifier so Netscape 4 ignores it */
+ at media screen, print { 
+	/* Turn off list bullets */
+	ul.mktree  li { list-style: none; } 
+	/* Control how "spaced out" the tree is */
+	ul.mktree, ul.mktree ul , ul.mktree li { margin-left:10px; padding:0px; }
+	/* Provide space for our own "bullet" inside the LI */
+	ul.mktree  li           .bullet { padding-left: 15px; }
+	/* Show "bullets" in the links, depending on the class of the LI that the link's in */
+	ul.mktree  li.liOpen    .bullet { cursor: pointer; background: url(minus.gif)  center left no-repeat; }
+	ul.mktree  li.liClosed  .bullet { cursor: pointer; background: url(plus.gif)   center left no-repeat; }
+	ul.mktree  li.liBullet  .bullet { cursor: default; background: url(item.gif) center left no-repeat; }
+	/* Sublists are visible or not based on class of parent LI */
+	ul.mktree  li.liOpen    ul { display: block; }
+	ul.mktree  li.liClosed  ul { display: none; }
+
+	/* Format menu items differently depending on what level of the tree they are in */
+	/* Uncomment this if you want your fonts to decrease in size the deeper they are in the tree */
+/*
+	ul.mktree  li ul li { font-size: 90% }
+*/
+
+}

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.js
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.js	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/mktree.js	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,168 @@
+/**
+ * Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com)
+ * 
+ * Dual licensed under the MIT and GPL licenses. 
+ * This basically means you can use this code however you want for
+ * free, but don't claim to have written it yourself!
+ * Donations always accepted: http://www.JavascriptToolbox.com/donate/
+ * 
+ * Please do not link to the .js files on javascripttoolbox.com from
+ * your site. Copy the files locally to your server instead.
+ * 
+ */
+/*
+This code is inspired by and extended from Stuart Langridge's aqlist code:
+		http://www.kryogenix.org/code/browser/aqlists/
+		Stuart Langridge, November 2002
+		sil at kryogenix.org
+		Inspired by Aaron's labels.js (http://youngpup.net/demos/labels/) 
+		and Dave Lindquist's menuDropDown.js (http://www.gazingus.org/dhtml/?id=109)
+*/
+
+// Automatically attach a listener to the window onload, to convert the trees
+addEvent(window,"load",convertTrees);
+
+// Utility function to add an event listener
+function addEvent(o,e,f){
+	if (o.addEventListener){ o.addEventListener(e,f,false); return true; }
+	else if (o.attachEvent){ return o.attachEvent("on"+e,f); }
+	else { return false; }
+}
+
+// utility function to set a global variable if it is not already set
+function setDefault(name,val) {
+	if (typeof(window[name])=="undefined" || window[name]==null) {
+		window[name]=val;
+	}
+}
+
+// Full expands a tree with a given ID
+function expandTree(treeId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	expandCollapseList(ul,nodeOpenClass);
+}
+
+// Fully collapses a tree with a given ID
+function collapseTree(treeId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	expandCollapseList(ul,nodeClosedClass);
+}
+
+// Expands enough nodes to expose an LI with a given ID
+function expandToItem(treeId,itemId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	var ret = expandCollapseList(ul,nodeOpenClass,itemId);
+	if (ret) {
+		var o = document.getElementById(itemId);
+		if (o.scrollIntoView) {
+			o.scrollIntoView(false);
+		}
+	}
+}
+
+// Performs 3 functions:
+// a) Expand all nodes
+// b) Collapse all nodes
+// c) Expand all nodes to reach a certain ID
+function expandCollapseList(ul,cName,itemId) {
+	if (!ul.childNodes || ul.childNodes.length==0) { return false; }
+	// Iterate LIs
+	for (var itemi=0;itemi<ul.childNodes.length;itemi++) {
+		var item = ul.childNodes[itemi];
+		if (itemId!=null && item.id==itemId) { return true; }
+		if (item.nodeName == "LI") {
+			// Iterate things in this LI
+			var subLists = false;
+			for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
+				var sitem = item.childNodes[sitemi];
+				if (sitem.nodeName=="UL") {
+					subLists = true;
+					var ret = expandCollapseList(sitem,cName,itemId);
+					if (itemId!=null && ret) {
+						item.className=cName;
+						return true;
+					}
+				}
+			}
+			if (subLists && itemId==null) {
+				item.className = cName;
+			}
+		}
+	}
+}
+
+// Search the document for UL elements with the correct CLASS name, then process them
+function convertTrees() {
+	setDefault("treeClass","mktree");
+	setDefault("nodeClosedClass","liClosed");
+	setDefault("nodeOpenClass","liOpen");
+	setDefault("nodeBulletClass","liBullet");
+	setDefault("nodeLinkClass","bullet");
+	setDefault("preProcessTrees",true);
+	if (preProcessTrees) {
+		if (!document.createElement) { return; } // Without createElement, we can't do anything
+		var uls = document.getElementsByTagName("ul");
+		if (uls==null) { return; }
+		var uls_length = uls.length;
+		for (var uli=0;uli<uls_length;uli++) {
+			var ul=uls[uli];
+			if (ul.nodeName=="UL" && ul.className==treeClass) {
+				processList(ul);
+			}
+		}
+	}
+}
+
+function treeNodeOnclick() {
+	this.parentNode.className = (this.parentNode.className==nodeOpenClass) ? nodeClosedClass : nodeOpenClass;
+	return false;
+}
+function retFalse() {
+	return false;
+}
+// Process a UL tag and all its children, to convert to a tree
+function processList(ul) {
+	if (!ul.childNodes || ul.childNodes.length==0) { return; }
+	// Iterate LIs
+	var childNodesLength = ul.childNodes.length;
+	for (var itemi=0;itemi<childNodesLength;itemi++) {
+		var item = ul.childNodes[itemi];
+		if (item.nodeName == "LI") {
+			// Iterate things in this LI
+			var subLists = false;
+			var itemChildNodesLength = item.childNodes.length;
+			for (var sitemi=0;sitemi<itemChildNodesLength;sitemi++) {
+				var sitem = item.childNodes[sitemi];
+				if (sitem.nodeName=="UL") {
+					subLists = true;
+					processList(sitem);
+				}
+			}
+			var s= document.createElement("SPAN");
+			var t= '\u00A0'; // &nbsp;
+			s.className = nodeLinkClass;
+			if (subLists) {
+				// This LI has UL's in it, so it's a +/- node
+				if (item.className==null || item.className=="") {
+					item.className = nodeClosedClass;
+				}
+				// If it's just text, make the text work as the link also
+				if (item.firstChild.nodeName=="#text") {
+					t = t+item.firstChild.nodeValue;
+					item.removeChild(item.firstChild);
+				}
+				s.onclick = treeNodeOnclick;
+			}
+			else {
+				// No sublists, so it's just a bullet node
+				item.className = nodeBulletClass;
+				s.onclick = retFalse;
+			}
+			s.appendChild(document.createTextNode(t));
+			item.insertBefore(s,item.firstChild);
+		}
+	}
+}

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/utils.pt
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/utils.pt	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/browser/utils.pt	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,34 @@
+<html i18n:domain="zope">
+<body>
+
+<h3>Utility: <span tal:content="view/getName" /></h3>
+
+<div>
+	<div class="ident">
+	<h4>Component</h4>
+	<div tal:content="context/name" />
+	<div tal:condition="not: context/name">
+		Unnamed Utility
+	</div> 
+	</div>
+	
+	<div class="indent"
+		tal:define="provided view/getProvidedInterface">
+		<h4>Provided Interface</h4>
+		<ul class="attr-list" tal:condition="provided">
+			<li>
+				<a tal:attributes="href string:/@@registry.html/${provided}/@@introspector.html"
+				   tal:content="provided">
+				   zope.interface.Interface
+				   </a>
+			</li>
+		</ul>
+		<div tal:condition="not:provided">
+			No interface found
+		</div>
+	</div>
+</div>
+<br/>
+
+</body>
+</html>
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/configure.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/configure.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/configure.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,29 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="zope.introspector">
+ 
+  <include package=".browser" />
+  
+ <utility
+ 	provides=".interfaces.IRegistryInfo"
+ 	factory=".registry.RegistryInfoUtility"
+ 	/>
+ 	
+ <adapter
+ 	for="zope.component.interfaces.IAdapterRegistration"
+ 	provides=".interfaces.IRegistrySearch"
+ 	factory=".adapters.AdapterSearch"
+ 	/>
+
+ <adapter
+ 	for="zope.component.interfaces.IHandlerRegistration"
+ 	provides=".interfaces.IRegistrySearch"
+ 	factory=".adapters.HandlerSearch"
+ 	/>
+
+ <adapter
+ 	for="zope.component.interfaces.IUtilityRegistration"
+ 	provides=".interfaces.IRegistrySearch"
+ 	factory=".adapters.UtilitySearch"
+ 	/>
+ 
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/ftesting.zcml
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/ftesting.zcml	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/ftesting.zcml	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,50 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:meta="http://namespaces.zope.org/meta"
+           i18n_domain="zope.introspector">
+
+  <!-- Turn on the devmode -->
+  <meta:provides feature="devmode" />
+  <include package="zope.introspector" />
+  
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+  <include package="zope.app.securitypolicy" />
+  <securityPolicy 
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <!-- Test Principals -->
+
+  <unauthenticatedPrincipal id="zope.anybody"
+                            title="Unauthenticated User" />
+  <unauthenticatedGroup id="zope.Anybody"
+                        title="Unauthenticated Users" />
+  <authenticatedGroup id="zope.Authenticated"
+                      title="Authenticated Users" />
+  <everybodyGroup id="zope.Everybody"
+                  title="All Users" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw"
+      />
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw"
+      />
+
+  <grant permission="zope.View"
+         principal="zope.Anybody" />
+  <grant permission="zope.app.dublincore.view"
+         principal="zope.Anybody" />
+
+  <role id="zope.Manager" title="Site Manager" />
+  <role id="zope.Member" title="Site Member" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/interfaces.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/interfaces.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/interfaces.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,63 @@
+from zope.interface import Interface
+
+class IRegistryInfo(Interface):
+    """Keeps information about the Component registry.
+    """
+    def getAllRegistrations():
+        """ Returns a list of everything registered in the component registry. 
+        """
+    
+    def getAllUtilities():
+        """ Returns a list of all utilities registered in the component registery. 
+        """
+        
+    def getAllAdapters():
+        """ Returns a list of all adapters registered in the component registery. 
+        """
+    
+    def getAllHandlers():
+        """ Returns a list of all handlers registered in the component registery. 
+        """
+        
+    def getAllSubscriptionAdapters():
+        """ Returns a list of all handlers registered in the component registery. 
+        """
+        
+    def getRegistrationsForInterface(searchString, types):
+        """ Searches the component registry for any interface with searchString in the name...
+            Returns a list of component objects.
+        """
+        
+    def getAllInterfaces():
+        """ Returns a dictionary with all interfaces...
+            {'zope': 
+                    {'app':
+                            {'apidoc': [...],
+                             'applicationcontrol': [...],
+                             },
+                    'component': [...],
+                    },
+            'docutils': [...],
+            }
+        """
+        
+class IRegistrySearch(Interface):
+    """ Adapter interface that takes care of doing searches in different types of registry registrations.
+    """
+    
+    def __init__(registration):
+        """ Registers the registration in the adapter...
+        """
+        
+    def searchRegistration(string, caseSensitive):
+        """ Implements the search...
+            returns True or False
+        """
+        
+    def getInterfaces():
+        """ Returns a list with the interfaces involved in this registration
+        """
+        
+    def getObject():
+        """ Returns the registration
+        """
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/registry.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/registry.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/registry.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,104 @@
+from zope.interface import implements
+from zope.introspector.interfaces import IRegistryInfo, IRegistrySearch
+from zope.component import globalregistry
+from zope.interface.adapter import AdapterRegistry
+from zope.component.registry import AdapterRegistration, HandlerRegistration, UtilityRegistration
+
+
+class RegistryInfoUtility(object):
+    """ Give information about the component registry.
+        Implements the IRegistryInfo interface. 
+    """
+    implements(IRegistryInfo)
+    
+    def getAllRegistrations(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        adapters = self.getAllAdapters()
+        handlers = self.getAllHandlers()
+        utils = self.getAllUtilities()
+        subsriptionAdapters = self.getAllSubscriptionAdapters()
+        return adapters + handlers + utils + subsriptionAdapters
+        
+    def getAllUtilities(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        return [x for x in globalregistry.base.registeredUtilities()]
+        
+    def getAllAdapters(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        return [x for x in globalregistry.base.registeredAdapters()]
+    
+    def getAllHandlers(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        return [x for x in globalregistry.base.registeredHandlers()]
+    
+    def getAllSubscriptionAdapters(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        return [x for x in globalregistry.base.registeredSubscriptionAdapters()]
+    
+    def getRegistrationsForInterface(self, searchString='', types=['all']):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        interfaces = []
+        searchInterfaces = []
+        
+        if 'all' in types:
+            searchInterfaces = self.getAllRegistrations()
+        if 'adapters' in types:
+            searchInterfaces.extend(self.getAllAdapters())
+        if 'utilities' in types:
+            searchInterfaces.extend(self.getAllUtilities())
+        if 'handlers' in types:
+            searchInterfaces.extend(self.getAllHandlers())
+        if 'subscriptionAdapters' in types:
+            searchInterfaces.extend(self.getAllSubscriptionAdapters())
+        
+        #Search using adapters
+        for eachRegistration in searchInterfaces:
+            if IRegistrySearch(eachRegistration).searchRegistration(searchString):
+                interfaces.append(eachRegistration)                    
+        return interfaces
+    
+    def getAllInterfaces(self):
+        """ See zope.introspector.interfaces for documentation.
+        """
+        registrations = {}
+
+        for eachRegistration in self.getAllRegistrations():
+            reg = IRegistrySearch(eachRegistration)
+            interfacePaths = reg.getInterfaces()
+            import pprint; 
+            #pprint.pprint(interfacePaths)
+
+            for eachInterface in interfacePaths:
+                registrations = self._dicter(registrations, eachInterface.split('.'), reg.getObject())
+
+        return registrations
+    
+    def _dicter(self, dictionary, modPath, item):
+        
+        key = modPath[0]
+
+        if key in dictionary:
+            # has key enter that dictionary and continue looking for the end
+            if len(modPath) == 1:
+                dictionary[key].append(item)
+            else:
+                self._dicter(dictionary[key], modPath[1:], item)
+        else:
+            # No key found,
+            # create a dictionary and add.
+            dictionary[key] = self._createDict(modPath[1:], item)
+    
+        return dictionary
+    
+    def _createDict(self, path, item):
+        if not path:
+            return [item]
+        return {path[0]:self._createDict(path[1:], item)}
+    
+    
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/testing.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/testing.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/testing.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,21 @@
+import os.path
+from zope.testing import doctest
+from zope.app.testing import functional
+
+ftesting_zcml = os.path.join(os.path.dirname(__file__), 'ftesting.zcml')
+FunctionalLayer = functional.ZCMLLayer(ftesting_zcml, __name__,
+                                       'FunctionalLayer')
+
+def FunctionalDocTestSuite(module=None, **kw):
+    module = doctest._normalize_module(module)
+    suite = functional.FunctionalDocTestSuite(module, **kw)
+    suite.layer = FunctionalLayer
+    return suite
+
+def FunctionalDocFileSuite(path, **kw):
+    suite = functional.FunctionalDocFileSuite(path, **kw)
+    suite.layer = FunctionalLayer
+    return suite
+
+class FunctionalTestCase(functional.FunctionalTestCase):
+    layer = FunctionalLayer

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/__init__.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/__init__.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/__init__.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1 @@
+#
\ No newline at end of file

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/test_componentInterfaces.py
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/test_componentInterfaces.py	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/src/zope/introspector/tests/test_componentInterfaces.py	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,64 @@
+import unittest
+
+from zope.app.testing import placelesssetup, ztapi
+from zope.app.zapi import getUtility
+
+from zope.introspector.registry import RegistryInfoUtility
+from zope.introspector.interfaces import IRegistryInfo, IRegistrySearch
+from zope.introspector.adapters import *
+
+from zope.interface import Interface, implements
+
+
+class IDummy(Interface):
+    """Just a dummy interface
+    """
+
+class Dummy(object):
+    """ Just to implement IDummy
+    """
+    implements(IDummy)
+    
+class ComponentInterfaceRegisterTestCase(placelesssetup.PlacelessSetup, unittest.TestCase):
+    
+    def setUp(self):
+        placelesssetup.setUp()
+        ztapi.provideAdapter(IUtilityRegistration, IRegistrySearch, UtilitySearch)
+        ztapi.provideAdapter(IHandlerRegistration, IRegistrySearch, HandlerSearch)
+        ztapi.provideAdapter(IAdapterRegistration, IRegistrySearch, AdapterSearch)
+
+    
+    def test_list_handlers(self):
+        handlers = RegistryInfoUtility().getAllHandlers()
+        self.failUnless(isinstance(handlers, list))
+    
+    def test_list_adapters(self):
+        adapters = RegistryInfoUtility().getAllAdapters()
+        self.failUnless(isinstance(adapters, list))
+    
+    def test_list_utilities(self):
+        utilities = RegistryInfoUtility().getAllUtilities()
+        self.failUnless(isinstance(utilities, list))
+    
+    def test_list_all_registrations(self):
+        util = RegistryInfoUtility()
+        result = util.getAllRegistrations()
+        self.failUnless(isinstance(result, list))
+        
+    def test_interface_search(self):
+        
+        ztapi.provideUtility(IDummy, Dummy)
+        result = RegistryInfoUtility().getRegistrationsForInterface('Dummy', types=['utilities'])
+        self.failUnless(len(result) == 1)
+        
+    def test_get_component_registry(self):
+        interfaces = RegistryInfoUtility().getAllInterfaces()
+        self.failUnless(isinstance(interfaces, dict))
+        
+    
+
+def test_suite():
+    return unittest.TestSuite((
+                               unittest.makeSuite(ComponentInterfaceRegisterTestCase),
+                               ))
+    

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zdaemon.conf
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zdaemon.conf	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zdaemon.conf	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,8 @@
+<runner>
+  program bin/paster serve deploy.ini
+  daemon on
+  transcript log/zdaemon.log
+  socket-name var/zdaemonsock
+  # Enable this to run the child process as a different user
+  # user zope
+</runner>

Added: Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zope.conf
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zope.conf	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/src/zope.introspector/zope.conf	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,39 @@
+# Identify the component configuration used to define the site:
+site-definition site.zcml
+
+<zodb>
+  # Standard Filestorage
+  <filestorage>
+    path var/Data.fs
+  </filestorage>
+
+# Uncomment this if you want to connect to a ZEO server instead:
+#  <zeoclient>
+#    server localhost:8100
+#    storage 1
+#    # ZEO client cache, in bytes
+#    cache-size 20MB
+#    # Uncomment to have a persistent disk cache
+#    #client zeo1
+#  </zeoclient>
+</zodb>
+
+<eventlog>
+  # This sets up logging to both a file and to standard output
+  # (STDOUT).  The "path" setting can be a relative or absolute
+  # filesystem path or the tokens STDOUT or STDERR.
+
+  <logfile>
+    path log/z3.log
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+
+  <logfile>
+    path STDOUT
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+</eventlog>
+
+# Comment this line to disable developer mode.  This should be done in
+# production
+devmode on

Added: Sandbox/mlundwall/introspector.zope3/trunk/zdaemon.conf
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/zdaemon.conf	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/zdaemon.conf	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,8 @@
+<runner>
+  program bin/paster serve deploy.ini
+  daemon on
+  transcript log/zdaemon.log
+  socket-name var/zdaemonsock
+  # Enable this to run the child process as a different user
+  # user zope
+</runner>

Added: Sandbox/mlundwall/introspector.zope3/trunk/zope.conf
===================================================================
--- Sandbox/mlundwall/introspector.zope3/trunk/zope.conf	                        (rev 0)
+++ Sandbox/mlundwall/introspector.zope3/trunk/zope.conf	2008-06-17 20:47:32 UTC (rev 87468)
@@ -0,0 +1,39 @@
+# Identify the component configuration used to define the site:
+site-definition site.zcml
+
+<zodb>
+  # Standard Filestorage
+  <filestorage>
+    path var/Data.fs
+  </filestorage>
+
+# Uncomment this if you want to connect to a ZEO server instead:
+#  <zeoclient>
+#    server localhost:8100
+#    storage 1
+#    # ZEO client cache, in bytes
+#    cache-size 20MB
+#    # Uncomment to have a persistent disk cache
+#    #client zeo1
+#  </zeoclient>
+</zodb>
+
+<eventlog>
+  # This sets up logging to both a file and to standard output
+  # (STDOUT).  The "path" setting can be a relative or absolute
+  # filesystem path or the tokens STDOUT or STDERR.
+
+  <logfile>
+    path log/z3.log
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+
+  <logfile>
+    path STDOUT
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+</eventlog>
+
+# Comment this line to disable developer mode.  This should be done in
+# production
+devmode on



More information about the Checkins mailing list