[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/wsgi/README.txt Thanks to Jim for making me not use site.zcml. We are now using an empty

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Oct 12 05:22:30 EDT 2005


Log message for revision 39091:
  Thanks to Jim for making me not use site.zcml. We are now using an empty
  temporaray site.zcml file. This is minimal, much faster and removes the 
  two hang-over threads we saw before. So, yipee! :-)
  
  

Changed:
  U   Zope3/trunk/src/zope/app/wsgi/README.txt

-=-
Modified: Zope3/trunk/src/zope/app/wsgi/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/README.txt	2005-10-12 09:20:23 UTC (rev 39090)
+++ Zope3/trunk/src/zope/app/wsgi/README.txt	2005-10-12 09:22:29 UTC (rev 39091)
@@ -103,9 +103,16 @@
 the Zope 3 application server and returns a WSGI application. Here is a simple
 example:
 
+  # We have to create our own site definition file -- which will simply be
+  # empty -- to provide a minimal test.
+  >>> import os, tempfile
+  >>> temp_dir = tempfile.mkdtemp()
+  >>> sitezcml = os.path.join(temp_dir, 'site.zcml')
+  >>> open(sitezcml, 'w').write('<configure />')
+
   >>> from cStringIO import StringIO
   >>> configFile = StringIO('''
-  ... site-definition site.zcml
+  ... site-definition %s
   ...
   ... <zodb>
   ...   <mappingstorage />
@@ -116,12 +123,15 @@
   ...     path STDOUT
   ...   </logfile>
   ... </eventlog>
-  ... ''')
+  ... ''' %sitezcml)
 
   >>> app = wsgi.getWSGIApplication(configFile)
   >>> app
   <zope.app.wsgi.WSGIPublisherApplication object at ...>
 
+  >>> import shutil
+  >>> shutil.rmtree(temp_dir)
+
 About WSGI
 ----------
 



More information about the Zope3-Checkins mailing list