#!/usr/bin/env python ############################################################################## # # Copyright (c) 2003 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. # ############################################################################## __version__ = '$Revision: 1.3 $'[11:-2] import ZConfig.loader from ZConfig.info import * import sys, cgi def esc(x): return cgi.escape(str(x)) def dt(x): tn = type(x).__name__ if tn == 'instance': return '%s %s'%(tn, x.__class__.__module__ + '.' + x.__class__.__name__) elif tn == 'class': return '%s %s'%(tn, x.__module__ + '.' + x.__name__) else: return '%s %s'%(tn, x.__name__) class explain: done = [] def __call__(self, st): if st.name in self.done: return self.done.append(st.name) if st.description: print st.description for sub in st.getsubtypenames(): print '