[Zope-Checkins] CVS: Zope/lib/python/Controller - Directives.py:1.1.2.1 Main.py:1.1.2.1 directives.gnumeric:1.1.2.1 MetaDirective.py:1.1.2.2 directives.csv:1.1.2.4 makeconfigfile.py:1.1.2.2 makedirectives.py:1.1.2.3 ZopeCtl.py:NONE directives.py:NONE

Chris McDonough chrism@zope.com
Mon, 2 Sep 2002 03:35:40 -0400


Update of /cvs-repository/Zope/lib/python/Controller
In directory cvs.zope.org:/tmp/cvs-serv17315/lib/python/Controller

Modified Files:
      Tag: chrism-install-branch
	MetaDirective.py directives.csv makeconfigfile.py 
	makedirectives.py 
Added Files:
      Tag: chrism-install-branch
	Directives.py Main.py directives.gnumeric 
Removed Files:
      Tag: chrism-install-branch
	ZopeCtl.py directives.py 
Log Message:
Overhaul of installer branch.

z2.py is no longer necessary (nor used in the default config).  
In prior iterations of the installer branch, the "controller" process
(zctl) "front-ended" for z2.py, translating environment variables and
command-line options as necessary to pass in to z2.py.

In this iteration, a new file named "zope.py" is responsible for starting
the Zope process.  It reads configuration directives directly and has
the capability to obtain a configuration from a file or via XML-RPC.
z2.py still exists in the branch, but it's unused.

The zope.py file can be used to start Zope, but a nicer front-end
for it is "zctl", which is a heavily-modified offshoot of Tres'
"zopectl".  The zctl module is now generalized enough that it
*might* be able to run on Windows (I haven't tested it, though).

zctl is still a standalone process.  This is to allow for the fact that
Windows doesn't have os.fork (or zctl would have just imported zope.py
and forked).

In order to maintain cross-platform capability, the "logtail" option
of zctl was removed.  We should create a Python "tail" function
to get around this.

Niceties: zctl is able to tell if its Zope is already running (so you
cant inadvertently start it twice).  The Z2.pid file is cleaned up
when Zope exits, also.

A small bug in FindHomes.py was also fixed (dont add SOFTWARE_HOME to
sys.path if it's already in there).  Additionally, zdaemon was modified
so that if a child Zope process exits with error code 255, the daemon
process does not restart it (not strictly necessary, but nice to have).


=== Added File Zope/lib/python/Controller/Directives.py === (570/670 lines abridged)
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
# 
##############################################################################
" Directive registry for configuration at startup. "
__version__='$Revision: 1.1.2.1 $'[11:-2]

from MetaDirective import *

class zope_home(EnvironmentDirective):
    desc = 'The \'top-level\' Zope software directory (home of the Zserver directory, the doc directory, the utilities directory, etc.)'
    category = 'general'
    valtype  = 'path'
    influences = 'ZOPE_HOME'
    value = ZOPE_HOME
    meta_default = 'The directory in which the \'zope.py\' file (or other executable file used to start Zope) lives.'
    example = '/home/chrism/software/Trunk'

class instance_home(EnvironmentDirective):
    desc = 'The path to the data files, local product files, import directory, and Extensions directory used by Zope.'
    category = 'general'
    valtype  = 'path'
    influences = 'INSTANCE_HOME'
    value = INSTANCE_HOME
    meta_default = 'The current working directory when Zope is started.'
    example = '/home/chrism/projects/sessions'

class software_home(EnvironmentDirective):
    desc = 'The path to the majority of the Python software files used by Zope.  One software_home can support many instance_homes.'
    category = 'general'
    valtype  = 'path'
    influences = 'SOFTWARE_HOME'
    value = SOFTWARE_HOME
    meta_default = 'ZOPE_HOME/lib/python'
    example = '/home/chrism/software/Trunk/lib/python'

class client_home(EnvironmentDirective):
    desc = 'The directory in which a running Zope\'s process identifier files are placed.'
    category = 'general'
    valtype  = 'path'
    influences = 'CLIENT_HOME'

[-=- -=- -=- 570 lines omitted -=- -=- -=-]

access_syslog_path = access_syslog_path()
access_syslog_server = access_syslog_server()
event_log_filename = event_log_filename()
event_log_severity = event_log_severity()
event_syslog_facility = event_syslog_facility()
event_syslog_path = event_syslog_path()
event_syslog_server = event_syslog_server()
trace_log_filename = trace_log_filename()
default_structured_text_header_level = default_structured_text_header_level()
maximum_security_manager_stack_size = maximum_security_manager_stack_size()
publisher_profile_file = publisher_profile_file()
webdav_source_user_agents = webdav_source_user_agents()
dns_server_address = dns_server_address()
ip_address = ip_address()
default_http_realm = default_http_realm()
fastcgi_resource_path_or_port = fastcgi_resource_path_or_port()
force_http_connection_close = force_http_connection_close()
http_server_ports = http_server_ports()
ftp_server_ports = ftp_server_ports()
icp_server_ports = icp_server_ports()
monitor_server_ports = monitor_server_ports()
webdav_source_server_ports = webdav_source_server_ports()
pcgi_resource_path = pcgi_resource_path()
automatically_quote_dtml_request_data = automatically_quote_dtml_request_data()
skip_authentication_checking = skip_authentication_checking()
skip_ownership_checking = skip_ownership_checking()
security_policy_implementation = security_policy_implementation()
maximum_number_of_session_objects = maximum_number_of_session_objects()
session_add_notify_script_path = session_add_notify_script_path()
session_delete_notify_script_path = session_delete_notify_script_path()
session_timeout_minutes = session_timeout_minutes()
suppress_all_access_rules = suppress_all_access_rules()
suppress_all_site_roots = suppress_all_site_roots()
zodb_filestorage_filepath = zodb_filestorage_filepath()
zodb_db_cache_size = zodb_db_cache_size()
zodb_db_pool_size = zodb_db_pool_size()
database_quota_size = database_quota_size()
read_only_database = read_only_database()
use_zeo_server = use_zeo_server()
zeo_client_name = zeo_client_name()
zeo_storage_server_hostname = zeo_storage_server_hostname()
zeo_storage_server_path_or_port = zeo_storage_server_path_or_port()
zeo_storage_server_storagename = zeo_storage_server_storagename()
zeo_client_cache_size = zeo_client_cache_size()
zeo_client_debug = zeo_client_debug()
zeo_client_cache_directory = zeo_client_cache_directory()
zeo_client_min_disconnect_poll = zeo_client_min_disconnect_poll()
zeo_client_max_disconnect_poll = zeo_client_max_disconnect_poll()
zeo_client_wait_for_server_on_startup = zeo_client_wait_for_server_on_startup()
__all__ = ['zope_home', 'instance_home', 'software_home', 'client_home', 'python_path', 'debug_mode', 'effective_user', 'inhibit_product_installation', 'locale', 'number_of_threads', 'python_check_interval', 'use_daemon_process', 'zserver_read_only_mode', 'pid_filename', 'acccess_syslog_facility', 'access_log_filename', 'access_syslog_path', 'access_syslog_server', 'event_log_filename', 'event_log_severity', 'event_syslog_facility', 'event_syslog_path', 'event_syslog_server', 'trace_log_filename', 'default_structured_text_header_level', 'maximum_security_manager_stack_size', 'publisher_profile_file', 'webdav_source_user_agents', 'dns_server_address', 'ip_address', 'default_http_realm', 'fastcgi_resource_path_or_port', 'force_http_connection_close', 'http_server_ports', 'ftp_server_ports', 'icp_server_ports', 'monitor_server_ports', 'webdav_source_server_ports', 'pcgi_resource_path', 'automatically_quote_dtml_request_data', 'skip_authentication_checking', 'skip_ownership_chec!
king', 'security_policy_implementation', 'maximum_number_of_session_objects', 'session_add_notify_script_path', 'session_delete_notify_script_path', 'session_timeout_minutes', 'suppress_all_access_rules', 'suppress_all_site_roots', 'zodb_filestorage_filepath', 'zodb_db_cache_size', 'zodb_db_pool_size', 'database_quota_size', 'read_only_database', 'use_zeo_server', 'zeo_client_name', 'zeo_storage_server_hostname', 'zeo_storage_server_path_or_port', 'zeo_storage_server_storagename', 'zeo_client_cache_size', 'zeo_client_debug', 'zeo_client_cache_directory', 'zeo_client_min_disconnect_poll', 'zeo_client_max_disconnect_poll', 'zeo_client_wait_for_server_on_startup']


=== Added File Zope/lib/python/Controller/Main.py === (515/615 lines abridged)
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
#
##############################################################################
""" The main Zope startup code (replaces logic in z2.py) """

import os, sys, codecs, string, socket, re, warnings
from types import StringType, IntType
import Directives
from Directives import __all__ as DIRECTIVE_NAMES
_marker = []

def hold(stuff, d={}):
    d[stuff] = 1

def start_zope(config):
    # config *must* include zope_home, software_home and instance_home
    ZOPE_HOME          = config['zope_home']
    SOFTWARE_HOME      = config['software_home']
    INSTANCE_HOME      = config['instance_home']

    # all other directives are optional
    NUMBER_OF_THREADS  = config.get('number_of_threads') or 4
    IP_ADDRESS         = config.get('ip_address')
    DNS_IP             = config.get('dns_server_address')
    UID                = config.get('effective_user')
    LOG_FILE           = config.get('access_log_filename')
    HTTP_PORT          = server_info(config.get('http_server_ports'))
    FORCE_HTTP_CONN    = config.get('force_http_connection_close')
    WEBDAV_SOURCE_PORT = server_info(config.get('webdav_source_server_ports'))
    FTP_PORT           = server_info(config.get('ftp_server_ports'))
    PCGI_FILE          = config.get('pcgi_resource_path')
    MONITOR_PORT       = server_info(config.get('monitor_server_ports'))
    ICP_PORT           = server_info(config.get('icp_server_ports'))
    LOCALE_ID          = config.get('locale')
    FCGI_PORT          = config.get('fastcgi_resource_path_or_port')
    DETAILED_LOG_FILE  = config.get('trace_log_filename')
    READ_ONLY          = config.get('read_only')
    DEBUG              = config.get('debug_mode')
    ZSYSLOG_ACCESS     = config.get('access_syslog_path')
    ZSYSLOG_ACCESS_FAC = config.get('access_syslog_facility')
    ZSYSLOG_ACCESS_SRV = config.get('access_syslog_server')

[-=- -=- -=- 515 lines omitted -=- -=- -=-]

    
class ConfigParseError(Exception):
    pass

def _warn_nobody():
    zLOG.LOG("z2", zLOG.INFO, ("Running Zope as 'nobody' can compromise "
                               "your Zope files; consider using a "
                               "dedicated user account for Zope"))

def server_info(l, default_ip='', offset=0):
    out = []
    if l is None:
        return out
    for v in l:
        # interpret v as a port or address/port and get new value
        a = default_ip
        if v == '-':
            continue
        if isinstance(v, type('')):
            tup = v.split(':', 1)
            if len(tup) == 2:
                a, v = tup
        try:
            v = int(v)
            if v < 0:
                raise 'Invalid port', v
            v = v + offset
        except:
            raise 'Invalid port', v
        out.append((a,v))

    return out

try:
    import fcntl
    def lock_file(file):
        un=file.fileno()
        fcntl.flock(un, fcntl.LOCK_EX | fcntl.LOCK_NB)
except:
    # Try windows-specific code:
    try:
        from winlock import LockFile
        def lock_file(file):
            un=file.fileno()
            LockFile(un,0,0,1,0) # just lock the first byte, who cares
    except:
        # we don't understand any kind of locking, forget it
        def lock_file(file):
            pass
    


=== Added File Zope/lib/python/Controller/directives.gnumeric ===
      }ks:,8JlYw9r]֒OdjE1EjHʗ9&I$ld?F_gqGz<~%QtgaߛCu.,jO뵪z{_9Ig5j/·͝?LR't\:xNJS8Tx{bY4~xЙûw,zgQ	č ;+$ҧ?NdF7~gu+
o*_`a2<d8EL#ۍ拀!9J2.s'~*Y[p0[A	lfau@?,=h9d\pqK/ace?|Ouqyv4X@0EsOKg jΞY~l)Yu'y:2p{'H@}=ʁO8Xr&zX;*FZ2%pX|>Q|dAJr^80]|];f3F,?~Z	5١k,%?fSXAºRxN^g]lraq\MR+b|z̈kjL"/Ff{``yg0rxf@^NL6Yh;
';Il>yȝ xrϩ>;DIm:qΦSg6?v:'Y0yzE\X0ں=/Ic?{yr~Z޿ů<C`?
ʿ~`ι^:k6- D`gУnCԬg!>pbS~EϗNA\`B;ẉAa:
K۳>:S߻/3aQzJ[qV>Qɀ@߆߱ f<3j% A8l>ap=)tY_;8{'4
wʄ!~\}6[9snt.rnuۍ_u?NccU2pc
CVvc_;jt`
swqnȹ^κXaݢ[;uݮZ팵߻vkEW&;uXj)-ݱ/v:JwoȻ
͝Ұ_Gi(Zk/m^ޝݱOȺ
C}ǹ;u8R;6*CcܖZMmuwܟ;Sqv2ѦvWWzwLp+JN
sն[s;"e-u3vPMeo4.e]FoܼYH?;#!WꝦ9kJbMĎ%",vv͞:FÜZ7{4Z39q?Anި8N,s(OVD-D>tux'Q,]w8(ht
_E.nx̒4hjy#A&q4tuxpF"DNnǣ?/Le0<~F?_2F_Hx0|F2Q>oG/ }橾Fo#/y.%SjYƷhY4g|V21Fݳb}VM'fǀ(~HV4Rk{?a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ective.py:1.1.2.1	Thu Aug 29 01:22:09 2002
+++ Zope/lib/python/Controller/MetaDirective.py	Mon Sep  2 03:35:09 2002
@@ -1,80 +1,116 @@
-def stringHandler(s, name, influences, type):
-    return {influences:s}
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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
+# 
+##############################################################################
+"""Base classes and type handlers for directive processing.
+"""
+__version__='$Revision$'[11:-2]
 
-pathHandler = stringHandler
+_marker = []
+import os, sys
 
-def onoffHandler(s, name, influences, type):
-    if type =='env':
-        if s == 'on':
-            return {influences:'1'}
+class Directive:
+    def getName(self):
+        return self.__class__.__name__
+
+    def set(self, value):
+        if value is not None:
+            self.value = dispatch[self.valtype](value)
         else:
-            return {influences:'0'}
+            self.value = None
+
+class EnvironmentDirective(Directive):
+    type = 'env'
+    def activate(self):
+        if self.value is not None:
+            os.environ[self.influences]=str(self.value)
+
+    def deactivate(self):
+        if os.environ.has_key(self.influences):
+            del os.environ[self.influences]
+
+class SwitchEnvironmentDirective(Directive):
+    type='env_switch'
+    def activate(self):
+        if self.value:
+            os.environ[self.influences] = str(self.value)
+
+    def deactivate(self):
+        if os.environ.has_key(self.influences):
+            del os.environ[self.influences]
+
+class CommandLineDirective(Directive):
+    type = 'cmd'
+    def activate(self):
+        # command directives are currently activated remotely
+        pass
+
+    def deactivate(self):
+        # command directives are currently deactivated remotely
+        pass
+
+def pathHandler(s):
+    s = s.strip()
+    if s == '-':
+        return ''
+    return s
+
+def stringHandler(s):
+    return s
+
+def onoffHandler(s):
+    if s.startswith('on'):
+        return 1
     else:
-        if s == 'on':
-            return {influences:''} # nonvalued switch
-        else:
-            return {}
+        return 0
 
-def intHandler(s, name, influences, type):
+def intHandler(s):
     try:
-        int(s)
+        return int(s)
     except:
         raise ValueError, '%s is not a valid integer value for %s' % (s,name)
-    return {influences:s}
 
-def stringListHandler(s, name, influences, type):
-    l = s.split()
-    out = []
-    i = 0
-    d = {}
-    if type == 'env':
-        raise ValueError, ('stringListHandler not equipped to handle '
-                           'environment settings for %s' % name)
-    for item in l:
-        # lame, but we use spaces to pad the keys in order to
-        # handle multiple of the same command-line switch directives
-        padding = ' ' * i
-        padded = '%s%s' % (padding, influences)
-        d[padded] = item
-        i = i + 1
-    return d
+def listHandler(s):
+    if s:
+        s = s.strip()
+        return s.split()
+    else:
+        return []
+
+def reverseOnOffHandler(s):
+    if s.startswith('on'):
+        return 0
+    else:
+        return 1
 
 dispatch = {
     'path':pathHandler,
     'onoff':onoffHandler,
     'string':stringHandler,
     'int':intHandler,
-    'stringlist':stringListHandler,
+    'stringlist':listHandler,
+    'revonoff':reverseOnOffHandler,
     }
 
+# these are used by the Directives module, don't remove them
 
-_marker = []
-
-class Directive:
-    def __init__(self, value=_marker):
-        if value is not _marker:
-            self.value = value
-
-    def output(self):
-        if self.value is None:
-            return None
-        return dispatch[self.valtype](
-            self.value,
-            self.getName(),
-            self.influences,
-            self.type,
-            )
-
-    def getName(self):
-        return self.__class__.__name__
-
-class EnvironmentDirective(Directive):
-    type = 'env'
-    def acceptVisit(self, visitor):
-        visitor.visitEnvironmentDirective(self)
-
-class CommandLineDirective(Directive):
-    type = 'cmd'
-    def acceptVisit(self, visitor):
-        visitor.visitCommandLineDirective(self)
+def absp(path):
+    return os.path.abspath(os.path.normpath(path))
 
+pjoin = os.path.join
+psplit = os.path.split
+dirname = os.path.dirname
+
+ZOPE_HOME = dirname(dirname(dirname(dirname(sys.modules[__name__].__file__))))
+SOFTWARE_HOME = pjoin(ZOPE_HOME, 'lib', 'python')
+INSTANCE_HOME = os.getcwd()
+CLIENT_HOME = pjoin(INSTANCE_HOME, 'var')


=== Zope/lib/python/Controller/directives.csv 1.1.2.3 => 1.1.2.4 ===
--- Zope/lib/python/Controller/directives.csv:1.1.2.3	Thu Aug 29 01:22:09 2002
+++ Zope/lib/python/Controller/directives.csv	Mon Sep  2 03:35:09 2002
@@ -1,50 +1,65 @@
-general	zope_home	The 'top-level' Zope software directory (home of the Zserver directory, the doc directory, the utilities directory, etc.)	env	path	ZOPE_HOME	none (required)	None	/home/chrism/software/Trunk
-general	instance_home	The path to the data files, local product files, import directory, and Extensions directory used by Zope.	env	path	INSTANCE_HOME	none (required)	None	/home/chrism/projects/sessions
-general	software_home	The path to the majority of the Python software files used by Zope.  One software_home can support many instance_homes.	env	path	SOFTWARE_HOME	none (required)	None	/home/chrism/software/Trunk/lib/python
-general	client_home	The directory in which a running Zope's process identifier files are placed.	env	path	CLIENT_HOME	unset	None	/home/chrism/projects/sessions/var
-admin	debug_mode	If this directive is set to 'on', it causes the Zope process to not detach from the controlling terminal after it is run.  It also influences the behavior of some Zope objects at runtime (for example, when debug mode is "on", you are able to view changes made to DTMLFile and PageTemplateFile objects immediately; When it is 'off', you must restart the server to see the changes.  Setting this to 'off' when Zope is in a production environment is encouraged, as it speeds execution.	cmd	onoff	-D	on	None	on
+general	zope_home	The 'top-level' Zope software directory (home of the Zserver directory, the doc directory, the utilities directory, etc.)	env	path	ZOPE_HOME	The directory in which the 'zope.py' file (or other executable file used to start Zope) lives.	ZOPE_HOME	/home/chrism/software/Trunk
+general	instance_home	The path to the data files, local product files, import directory, and Extensions directory used by Zope.	env	path	INSTANCE_HOME	The current working directory when Zope is started.	INSTANCE_HOME	/home/chrism/projects/sessions
+general	software_home	The path to the majority of the Python software files used by Zope.  One software_home can support many instance_homes.	env	path	SOFTWARE_HOME	ZOPE_HOME/lib/python	SOFTWARE_HOME	/home/chrism/software/Trunk/lib/python
+general	client_home	The directory in which a running Zope's process identifier files are placed.	env	path	CLIENT_HOME	INSTANCE_HOME/var	CLIENT_HOME	/home/chrism/projects/sessions/var
+general	python_path	Set the PYTHONPATH environment variable with the value of this directive.  The PYTHONPATH represents a list of directories which are prefixed to the default list of directories searched by Python when it attempts to look up module names.  See the Python documentation for more information on PYTHONPATH.  It must be a colon-separated list of directory names.	env	string	PYTHONPATH	unset	None	/home/chrism/opt/Python-2.1.3:/usr/lib/python
+admin	debug_mode	If this directive is set to 'on', it causes the Zope process to not detach from the controlling terminal after it is run.  It also influences the behavior of some Zope objects at runtime (for example, when debug mode is "on", you are able to view changes made to DTMLFile and PageTemplateFile objects immediately; When it is 'off', you must restart the server to see the changes.  Additionally, event log and other log output will not be sent to the console when this directive is set to 'off'. Setting this to 'off' when Zope is in a production environment is encouraged, as it speeds execution.	env_switch	onoff	Z_DEBUG_MODE	on	1	on
 admin	effective_user	If you intend to run Zope as the "root" user, you must supply this directive with an effective username or userid number to which Zope will 'suid' after the server ports are bound.  This directive only works under UNIX and if Zope is started as the root user.	cmd	string	-u	unset	None	chrism
-admin	inhibit_product_installation	If this  directive is set, the 'product installation' step performed by Zope at startup is prevented.  This can speed Zope startup time, but it can also cause your Control_Panel Product list to become desynchronized with the contents of your Products directories.  If the 'zeo_client_name' directive is set, and this directive is unset, this directive will be implicitly turned on.  By default, it is off.	env	onoff	FORCE_PRODUCT_LOAD	unset	None	on
+admin	inhibit_product_installation	If this  directive is set, the 'product installation' step performed by Zope at startup is prevented.  This can speed Zope startup time, but it can also cause your Control_Panel Product list to become desynchronized with the contents of your Products directories.  If the 'zeo_client_name' directive is set, and this directive is unset, this directive will be implicitly turned on.  By default, it is off.	env_switch	revonoff	FORCE_PRODUCT_LOAD	off	0	on
 admin	locale	Enable locale (internationalization) support by supplying a locale name to be used.  See your operating system documentation for locale information specific to your system.  If your Python module does not support the locale module, or if the requested locale is not supported by your system, an error will be raised and Zope will not start.	cmd	string	-L	unset	None	fr_FR
 admin	number_of_threads	Specify the number of threads that Zope will use to service requests.  The default is 4.	cmd	int	-t	4	None	10
-admin	python_check_interval	Specify an integer representing the Python interpreter "check interval"  This interval determines how often the interpreter checks for perioding things such as thread switches and signal handlers.  The Zope default is 500, but you may want to experiment with other values in order to attempt to increae performance in your particular environment.	cmd	int	-i	500	None	1000
-admin	use_daemon_process	If this directive is set to 'on', Zope will be managed by a 'daemon' process which will restart the Zope process if it dies unexpectedly.	cmd	onoff	-Z	on	None	on
+admin	python_check_interval	Specify an integer representing the Python interpreter "check interval"  This interval determines how often the interpreter checks for perioding things such as thread switches and signal handlers.  The Zope default is 500, but you may want to experiment with other values in order to attempt to increae performance in your particular environment.	cmd	int	-i	500	500	1000
+admin	use_daemon_process	If this directive is set to 'on', Zope will be managed by a 'daemon' process which will restart the Zope process if it dies unexpectedly.	cmd	onoff	-Z	on	1	on
 admin	zserver_read_only_mode	If this directive is set to 'on', it will cause Zope to inhibit the creation of log files and pid files.  Access and event log files will be presented on standard output.  Setting this directive 'on' causes pcgi, fastcgi, and daemon-related directives to have no effect.	cmd	onoff	-r	off	None	on
+admin	pid_filename	The path to the file in which the Zope process id(s) will be written.  This defaults to client_home/Z2.pid.	cmd	path	special (admin)	CLIENT_HOME/Z2.pid	pjoin(client_home.value, 'Z2.pid')	/home/chrism/projects/sessions/var/Z2.pid
 log	acccess_syslog_facility	Same as 'event_syslog_facility', only for the "access" log data (z2.log data).	env	string	ZSYSLOG_ACCESS_FACILITY	unset	None	local7
-log	access_log_filename	The file path of the Zope 'access' log (z2.log) which is written in the combined logfile format.  The access log will be printed to standard output if the 'zserver_read_only' directive is set to 'on', regardless of this setting.	cmd	string	-I	INSTANCE_HOME/var/z2.log	None	/home/chrism/projects/sessions/z2.log
+log	access_log_filename	The file path of the Zope 'access' log (z2.log) which is written in the combined logfile format.  The access log will be printed to standard output if the 'zserver_read_only' directive is set to 'on', regardless of this setting.	cmd	string	-I	CLIENT_HOME/z2.log	pjoin(client_home.value, 'Z2.log')	/home/chrism/projects/sessions/z2.log
 log	access_syslog_path	Same as event_syslog_path, only for the "access" log data (z2.log data).	env	path	ZSYSLOG_ACCESS	unset	None	/dev/log
 log	access_syslog_server	Same as event_syslog_path, only for the 'access' data (z2.log data).	env	string	ZSYSLOG_ACCESS_SERVER	unset	None	syslog.example.com:514
-log	event_log_filename	Path to the Zope event log for debugging information.	env	path	EVENT_LOG_FILE	unset	None	/home/chrism/projects/var/event.log
-log	event_log_severity	Filter events that can be written to the event log by priority.  A higher priority means fewer events will be written.  Choose one of (300, 200, 100, 0, -100, -200, or -300).  Descriptions of the integer levels are as follows: 300=PANIC, 200=ERROR, 100=WARNING, 0=INFO, -100=BLATHER, -200=DEBUG, -300=TRACE).	env	string	EVENT_LOG_SEVERITY	0	None	100
+log	event_log_filename	Path to the Zope event log for debugging information.	env	path	EVENT_LOG_FILE	standard output ('-')	''	/home/chrism/projects/var/event.log
+log	event_log_severity	Filter events that can be written to the event log by priority.  A higher priority means fewer events will be written.  Choose one of (300, 200, 100, 0, -100, -200, or -300).  Descriptions of the integer levels are as follows: 300=PANIC, 200=ERROR, 100=WARNING, 0=INFO, -100=BLATHER, -200=DEBUG, -300=TRACE).	env	int	EVENT_LOG_SEVERITY	0	0	100
 log	event_syslog_facility	The facility used when the event log is being written to syslog (when 'event_syslog_path' or 'event_syslog_server' is set).	env	string	ZSYSLOG_FACILITY	user	None	local7
 log	event_syslog_path	Setting this directive will cause Zope to write the event log to syslog on the named UNIX domain socket on the local host.  This only works on UNIX.  It is overridden by specifying 'event_syslog_server'.	env	path	ZSYSLOG	unset	None	/dev/log
 log	event_syslog_server	Specify a machine and udp port to send event data to over syslog.  The format of this directive should be 'machine_name:port'.	env	string	ZSYSLOG_SERVER	unset	None	syslog.example.com:514
 log	trace_log_filename	The file path of the Zope 'trace' log which contains detailed request information which can later be interpreted by the requestprofiler.py script in the utilities directory. 	cmd	string	-M	unset	None	/home/chrism/projects/sessions/trace.log
-misc	default_structured_text_header_level	Set the default starting HTML header level for structured text documents.  The default is 3, which implies that  top-level headers will be created with an <H3> tag.	env	int	STX_DEFAULT_LEVEL	3	None	1
-misc	maximum_security_manager_stack_size	This variable allows you to customize the size of the Zope SecurityManager stack.  You shouldn't change this unless you know what it means.	env	int	Z_MAX_STACK_SIZE	100	None	200
-misc	publisher_profile_file	Causing this directive to point to a file on the filesystem will cause Zope's profiling capabilities to be enabled.  For more information, see the Debug -> Profiling tab of the Control_Panel.	env	path	PROFILE_PUBLISHER	unset	None	/home/chrism/projects/sessions/var/profile/dat
+misc	default_structured_text_header_level	Set the default starting HTML header level for structured text documents.  The default is 3, which implies that  top-level headers will be created with an <H3> tag.	env	int	STX_DEFAULT_LEVEL	3	3	1
+misc	maximum_security_manager_stack_size	This variable allows you to customize the size of the Zope SecurityManager stack.  You shouldn't change this unless you know what it means.	env	int	Z_MAX_STACK_SIZE	100	100	200
+misc	publisher_profile_file	Causing this directive to point to a file on the filesystem will cause Zope's profiling capabilities to be enabled.  For more information, see the Debug -> Profiling tab of the Control_Panel.	env	path	PROFILE_PUBLISHER	unset	None	/home/chrism/projects/sessions/var/profile.dat
 misc	webdav_source_user_agents	Setting this directive enabls the retrieval of the *source* of Zope documents through the standard HTTP port instead of via a WebDAV source port (which are enabled via the 'webdav_source_server_ports' directive).   The value should be a regular expression that is matched against the user-agent string of the client.  Only clients which have a user-agent which match this regex will obain the source of the document via DAV on the normal HTTP port.	env	string	WEBDAV_SOURCE_PORT_CLIENTS	unset	None	cadaver.*
 network	dns_server_address	Specify the ip address of your DNS server in order to cause resolved hostnames to be written to Zope's access log.  By default, Zope will not resolve hostnames unless this is set.	cmd	string	-d	unset	None	127.0.0.1
-network	ip_address	The IP address on which Zope's various server protocol iimplementations will listen for requests.  If this is unset, Zope will listen on all IP addresses supported by the machine.	cmd	int	-a	unset	None	127.0.0.1
-protocol	default_http_realm	The HTTP "Realm" header value sent by this Zope instance.  This value often shows up in basic authentication dialogs.	env	string	Z_REALM	Zope	None	Slipknot
+network	ip_address	The IP address on which Zope's various server protocol iimplementations will listen for requests.  If this is unset, Zope will listen on all IP addresses supported by the machine.	cmd	string	-a	unset	None	127.0.0.1
+protocol	default_http_realm	The HTTP "Realm" header value sent by this Zope instance.  This value often shows up in basic authentication dialogs.	env	string	Z_REALM	Zope	'Zope'	Slipknot
 protocol	fastcgi_resource_path_or_port	Either a path (for unix domain sockets) or port number (for inet sockets) for the FastCGI server. 	cmd	string	-F	unset	None	/home/chrism/projects/sessions/fastcgi.soc
-protocol	force_http_connection_close	If set to on, this directive causes Zope to close all HTTP connections regardless of the 'Connection:' header (or lack thereof) specified by the client.	cmd	onoff	-C	off	None	on
-protocol	ftp_server_ports	A space-separated list of TCP port numbers on which Zope will listen for FTP requests.	cmd	stringlist	-f	8021	8021	8021 21
-protocol	http_server_ports	A space-separated list of TCP port numbers on which Zope will listen for HTTP requests.	cmd	stringlist	-w	8080	8080	8080 80
-protocol	icp_server_ports	A space-separated list of TCP port numbers on which Zope will listen for Internet Cache Protocol requests.	cmd	stringlist	--icp	unset	None	3130
-protocol	monitor_server_ports	A space-separated list of TCP port numbers on which Zope will listen for requests from the Medusa monitor client.  Useful for debugging purposes, but dangerous to leave open.	cmd	stringlist	-m	unset	None	8090 90
-protocol	pcgi_resource_path	Path to the PCGI 'resource' file.  If the file doesn't exist, PCGI is disabled.	cmd	path	-p	unset	None	/home/chrism/projects/sessions/pcgi.soc
-protocol	webdav_source_server_ports	A space-separated list of TCP port numbers on which Zope will listen for HTTP/WebDAV 'source' requests.  The source of the Zope object requested will be returned when requests are made to this set of ports, as opposed to the rendered version which is returned when the normal HTTP port is consulted.	cmd	stringlist	-W	9800	9800	9800 9801
-security	automatically_quote_dtml_request_data	Set this directive to 'off' in order to disable the autoquoting of implicitly retrieved REQUEST data by DTML code which contains a '<' when used in <dtml-var> construction.  When this directive is 'on', all data implicitly retrieved from the REQUEST in DTML (as opposed to addressing REQUEST.somevarname directly) that contains a '<' will be HTML-quoted when interpolated via a <dtml-var> or &dtml- construct.   This mitigates the possibility that DTML programmers will leave their sites open to a "client-side trojan" attack.	env	onoff	ZOPE_DTML_REQUEST_AUTOQUOTE	on	None	on
-security	perform_authentication_checking	Set this directive to 'off' to cause Zope to allow unauthenticated access to all resources.  DANGEROUS.	env	onoff	ZSP_AUTHENTICATED_SKIP	on	None	on
-security	perform_ownership_checking	Set this directive to 'off' to cause Zope to ignore ownership checking when attempting to execute "through the web" code.  By default, this directive is on in order to prevent 'trojan horse' security problems whereby a user with less privilege can cause a user with more privilege to execute dangerous code.	env	onoff	ZSP_OWNEROUS_SKIP	on	None	on
-security	security_policy_implementation	Set this directive to 'PYTHON' to use a pure-Python implementation of Zope's default security policy.  The default value for this directive is 'C".  Setting it to PYTHON causes Zope to run more slowly, but it can be helpful when attempting to debug security-related application failures.	env	string	ZOPE_SECURITY_POLICY	C	None	PYTHON
-sessions	maximum_number_of_session_objects	An integer value representing the number of items to use as a "maximum number of subobjects" value of the '/temp_folder/session_data' transient object container.	env	int	ZSESSION_OBJECT_LIMIT	1000	None	10000
+protocol	force_http_connection_close	If set to on, this directive causes Zope to close all HTTP connections regardless of the 'Connection:' header (or lack thereof) specified by the client.	cmd	onoff	-C	off	0	on
+protocol	http_server_ports	A space-separated list of TCP port numbers on which Zope will listen for HTTP requests.  Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum".	cmd	stringlist	-w	8080	[8080]	8080 80 1.2.3.4:80
+protocol	ftp_server_ports	A space-separated list of TCP port numbers on which Zope will listen for FTP requests.  Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum".	cmd	stringlist	-f	8021	[8021]	8021 21 1.2.3.4:21
+protocol	icp_server_ports	A space-separated list of TCP port numbers on which Zope will listen for ICP requests.  Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum".	cmd	stringlist	--icp	unset	None	3130 1.2.3.4:3130
+protocol	monitor_server_ports	A space-separated list of TCP port numbers on which Zope will listen for Medusa monitor requests.  Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum".  Connections to a medusa monitor port using the medusa monitor client allow a developer to remotely debug a running Zope.  It is dangerous to enable this for this reason.	cmd	stringlist	-m	unset	None	8090 90 1.2.3.4:90
+protocol	webdav_source_server_ports	A space-separated list of TCP port numbers on which Zope will listen for HTTP/WebDAV 'source' requests.  Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum".  The source of the Zope object requested will be returned when requests are made to this set of ports, as opposed to the rendered version which is returned when the normal HTTP port is consulted.	cmd	stringlist	-W	9800	[9800]	9800 9801
+protocol	pcgi_resource_path	Path to the PCGI 'resource' file.  If the directive is left unset or the file doesn't exist, PCGI is disabled.	cmd	path	-p	unset	None	/home/chrism/projects/sessions/Zope.cgi
+security	automatically_quote_dtml_request_data	Set this directive to 'off' in order to disable the autoquoting of implicitly retrieved REQUEST data by DTML code which contains a '<' when used in <dtml-var> construction.  When this directive is 'on', all data implicitly retrieved from the REQUEST in DTML (as opposed to addressing REQUEST.somevarname directly) that contains a '<' will be HTML-quoted when interpolated via a <dtml-var> or &dtml- construct.   This mitigates the possibility that DTML programmers will leave their sites open to a "client-side trojan" attack.	env	onoff	ZOPE_DTML_REQUEST_AUTOQUOTE	on	1	on
+security	skip_authentication_checking	Set this directive to 'on' to cause Zope to allow unauthenticated access to all resources.  DANGEROUS.  Only works if security_policy_implementation is C	env_switch	onoff	ZSP_AUTHENTICATED_SKIP	off	None	on
+security	skip_ownership_checking	Set this directive to 'on' to cause Zope to ignore ownership checking when attempting to execute "through the web" code.  By default, this directive is on in order to prevent 'trojan horse' security problems whereby a user with less privilege can cause a user with more privilege to execute dangerous code.	env_switch	onoff	ZSP_OWNEROUS_SKIP	off	None	on
+security	security_policy_implementation	Set this directive to 'PYTHON' to use a pure-Python implementation of Zope's default security policy.  The default value for this directive is 'C".  Setting it to PYTHON causes Zope to run more slowly, but it can be helpful when attempting to debug security-related application failures.	env	string	ZOPE_SECURITY_POLICY	C	'C'	PYTHON
+sessions	maximum_number_of_session_objects	An integer value representing the number of items to use as a "maximum number of subobjects" value of the '/temp_folder/session_data' transient object container.	env	int	ZSESSION_OBJECT_LIMIT	1000	1000	10000
 sessions	session_add_notify_script_path	An optional fill Zope path name of a callable object to be set as the "script to call on object addition" of the sessioN_data transient object container created in the /temp_folder folder at startup.	env	path	ZSESSION_ADD_NOTIFY	unset	None	/scripts/add_notifier
 sessions	session_delete_notify_script_path	An optional fill Zope path name of a callable object to be set as the "script to call on object deletion" of the sessioN_data transient object container created in the /temp_folder folder at startup.	env	path	ZSESSION_DEL_NOTIFY	unset	None	/scripts/del_notifier
-sessions	session_timeout_minutes	An integer value representing the number of minutes to be used as the "data object timeout" of the '/temp_folder/session_data' transient object container.	env	int	ZSESSION_TIMEOUT_MINS	20	None	30
-url	suppress_all_access_rules 	If this directive is set to on, no access rules in your Zope site will be executed.  This is useful if you "lock yourself out" of a particular part of your site by setting an improper access rule.	env	onoff	SUPPRESS_ACCESRULE	off	None	on
-url	suppress_all_site_roots	If this directive is set to on, no site roots in your Zope site will be effective.  This is useful if you "lock yourself out" of a particular part of your site by setting an improper site root.	env	onoff	SUPPRESS_SITEROOT	off	None	on
+sessions	session_timeout_minutes	An integer value representing the number of minutes to be used as the "data object timeout" of the '/temp_folder/session_data' transient object container.	env	int	ZSESSION_TIMEOUT_MINS	20	20	30
+url	suppress_all_access_rules 	If this directive is set to on, no access rules in your Zope site will be executed.  This is useful if you "lock yourself out" of a particular part of your site by setting an improper access rule.	env_switch	onoff	SUPPRESS_ACCESRULE	off	None	on
+url	suppress_all_site_roots	If this directive is set to on, no site roots in your Zope site will be effective.  This is useful if you "lock yourself out" of a particular part of your site by setting an improper site root.	env_switch	onoff	SUPPRESS_SITEROOT	off	None	on
+zodb	zodb_filestorage_filepath	Provide an absolute file path to the file which should be used as the default ZODB FileStorage.  If you leave this unset, it will default to INSTANCE_HOME/var/Data.fs.	cmd	path	special (custom_zodb.py)	INSTANCE_HOME/var/Data.fs	pjoin(instance_home.value, 'var', 'Data.fs')	/home/chrism/somedirectory/Data.fs
+zodb	zodb_db_cache_size	The target number of objects that will be stored in the local ZODB "pickle cache" (as per the Control_Panel -> Database tab).  The default is 5000.	cmd	int	special (custom_zodb.py)	5000	5000	
+zodb	zodb_db_pool_size	The number of ZODB database connections used by a ZODB.DB instance.  The default is 7.	cmd	int	special (custom_zodb.py)	7	7	
 zodb	database_quota_size	Set this directive to an integer in bytes in order to place a hard limit on the size which the default FileStorage-backed Zope database can grow.  Additions to the database will not be permitted once this filesize is exceeded.	env	int	ZOPE_DATABASE_QUOTA	unset	None	1000000
-zodb	read_only_database	This causes the main Zope FileStorage-backed ZODB to be opened in read-only mode.	env	onoff	ZOPE_READ_ONLY	off	None	on
+zodb	read_only_database	This causes the main Zope FileStorage-backed ZODB to be opened in read-only mode.	env_switch	onoff	ZOPE_READ_ONLY	off	0	on
+zodb	use_zeo_server	Specifying this option will cause Zope to use a ZEO server to obtain ZODB data instead of the 'default' FileStorage specified via 'zodb_filestorage_filepath'.   You must install the ZEO software before using this directive successfully.	cmd	onoff	special (custom_zodb.py)	off	0	on
 zodb	zeo_client_name	Provide a string value to uniquely identify the local cache files created if this Zope is a ZEO client.  Setting this directive implies setting 'inhibit_product_installation' to 'on' if 'inhibit_product_installation' is left unset.	env	string	ZEO_CLIENT	unset	None	zeo1
+zodb	zeo_storage_server_hostname	Provide a an IP address or hostname to specify a ZEO server which serves the "main" ZODB database for this Zope instance.  This directive will be ignored if you use a filepath for 'zeo_storage_server_path_or_port' (localhost is assumed in this case).	cmd	string	special (custom_zodb.py)	unset	None	storage.zope.com
+zodb	zeo_storage_server_path_or_port	Specify either a TCP port number (e.g. 2199) or a UNIX domain socket filename (e.g. /home/chrism/zeo.soc) to use as an argument to the ZEO ClientStorage constructor.  If you specify a TCP port number, you must have also specified a storage server name via 'zeo_storage_server_name'.  	cmd	string	special (custom_zodb.py)	unset	None	/home/chrism/zope/var/zeo.soc or 2199
+zodb	zeo_storage_server_storagename	Specifies a "storage name" to use under a ZEO-backed configuration.  The "typical" storage name is "1" (this is what ZEO defaults to when it serves only one storage).	cmd	string	special (custom_zodb.py)	unset	'1'	1 or Main
+zodb	zeo_client_cache_size	Specifies the size in bytes allocated to the ZEO client disk cache.  The default is 200,000,000 (200MB) bytes if this is left unset.	cmd	int	special (custom_zodb.py)	unset	200000000	20000000
+zodb	zeo_client_debug	If this is set to "on", the ZEO ClientStorage will output debugging information to the event log.	cmd	onoff	special (custom_zodb.py)	off	0	on
+zodb	zeo_client_cache_directory	Specify a directory in which the ZEO client cache files should be stored.  Defaults to INSTANCE_HOME/var.	cmd	onoff	special (custom_zodb.py)	INSTANCE_HOME/var/	client_home.value	/home/chrism/projects/sessions/var
+zodb	zeo_client_min_disconnect_poll	The minimum number of seconds that a ClientStorage will wait before retrying a connection after a failure.  The default is 5 if this is left unset.	cmd	int	special (custom_zodb.py)	5	5	10
+zodb	zeo_client_max_disconnect_poll	The maximum number of seconds that a ClientStorage will wait before retrying a connection after a failure.  The default is 300 if this is left unset.	cmd	int	special (custom_zodb.py)	300	300	300
+zodb	zeo_client_wait_for_server_on_startup	If this is set to "on", the ZEO ClientStorage will wait for a connection to its storage before serving data.  If this is set to "off", the ZEO ClientStorage will attempt to serve data out of its cache file at startup even if it cannot make a connection to a storage server.	cmd	onoff	special (custom_zodb.py)	off	0	on


=== Zope/lib/python/Controller/makeconfigfile.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/lib/python/Controller/makeconfigfile.py:1.1.2.1	Mon Aug 26 02:22:37 2002
+++ Zope/lib/python/Controller/makeconfigfile.py	Mon Sep  2 03:35:09 2002
@@ -27,12 +27,6 @@
         if example:
             print "# Example:\n#\n#    %s %s" % (name, example)
             print "#"
-        try:
-            default = eval(default)
-        except:
-            default = None
-        if default:
-            print "%s %s" % (name, default)
         print
         print
         


=== Zope/lib/python/Controller/makedirectives.py 1.1.2.2 => 1.1.2.3 ===
--- Zope/lib/python/Controller/makedirectives.py:1.1.2.2	Thu Aug 29 01:22:09 2002
+++ Zope/lib/python/Controller/makedirectives.py	Mon Sep  2 03:35:09 2002
@@ -1,8 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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
+# 
+##############################################################################
+"""Create the Directives.py file.
+"""
+header_text = """##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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
+# 
+##############################################################################
+" Directive registry for configuration at startup. "
+__version__='$Revision$'[11:-2]
+"""
 
 def main():
     f = open('directives.csv', 'r')
     all = []
-    print "from MetaDirective import EnvironmentDirective, CommandLineDirective"
+    print header_text
+    print "from MetaDirective import *"
     while 1:
         line = f.readline()
         if not line:
@@ -21,6 +53,8 @@
         print
         if type =='env':
             print "class %s(EnvironmentDirective):" % name
+        elif type == 'env_switch':
+            print "class %s(SwitchEnvironmentDirective):" % name
         else:
             print "class %s(CommandLineDirective):" % name
         print "    desc = '%s'" % desc
@@ -32,6 +66,9 @@
         print "    example = '%s'" % example
         all.append(name)
     print
+    print "# all directives are singletons"
+    for name in all:
+        print "%s = %s()" % (name, name)
     print '__all__ = %s' % repr(all)
     
 if __name__=='__main__':

=== Removed File Zope/lib/python/Controller/ZopeCtl.py ===

=== Removed File Zope/lib/python/Controller/directives.py ===