/usr/share/pyshared/zope/configuration/exclude.txt is in python-zope.configuration 3.7.4-2fakesync1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | Filtering and Inhibiting Configuration
======================================
The ``exclude`` standard directive is provided for inhibiting unwanted
configuration. It is used to exclude processing of configuration files.
It is useful when including a configuration that includes some other
configuration that you don't want.
It must be used BEFORE including the files to be excluded.
First, let's look at an example. The zope.configuration.tests.excludedemo
package has a ZCML configuration that includes some other configuration files.
We'll set a log handler so we can see what's going on:
>>> import logging, sys
>>> logger = logging.getLogger('config')
>>> oldlevel = logger.level
>>> logger.setLevel(logging.DEBUG)
>>> handler = logging.StreamHandler(sys.stdout)
>>> logger.addHandler(handler)
Now, we'll include the zope.configuration.tests.excludedemo config:
>>> from zope.configuration import xmlconfig
>>> _ = xmlconfig.string('<include package="zope.configuration.tests.excludedemo" />')
include /zope.configuration/src/zope/configuration/tests/excludedemo/configure.zcml
include /zope.configuration/src/zope/configuration/tests/excludedemo/sub/configure.zcml
include /zope.configuration/src/zope/configuration/tests/excludedemo/spam.zcml
Each run of the configuration machinery runs with fresh state, so
rerunning gives the same thing:
>>> _ = xmlconfig.string('<include package="zope.configuration.tests.excludedemo" />')
include /zope.configuration/src/zope/configuration/tests/excludedemo/configure.zcml
include /zope.configuration/src/zope/configuration/tests/excludedemo/sub/configure.zcml
include /zope.configuration/src/zope/configuration/tests/excludedemo/spam.zcml
Now, we'll use the exclude directive to exclude the two files included
by the configuration file in zope.configuration.tests.excludedemo:
>>> _ = xmlconfig.string(
... '''
... <configure xmlns="http://namespaces.zope.org/zope">
... <exclude package="zope.configuration.tests.excludedemo.sub" />
... <exclude package="zope.configuration.tests.excludedemo" file="spam.zcml" />
... <include package="zope.configuration.tests.excludedemo" />
... </configure>
... ''')
include /zope.configuration/src/zope/configuration/tests/excludedemo/configure.zcml
.. cleanup
>>> logger.setLevel(oldlevel)
>>> logger.removeHandler(handler)
|