[Zope3-checkins] CVS: Zope3/src/zope/app/advanced - __init__.py:1.1

Philipp von Weitershausen philikon at philikon.de
Thu Apr 1 12:09:25 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/advanced
In directory cvs.zope.org:/tmp/cvs-serv8085

Added Files:
	__init__.py 
Log Message:
Started the package with an __init__.py; this just checks for XML imports.


=== Added File Zope3/src/zope/app/advanced/__init__.py ===
##############################################################################
#
# Copyright (c) 2004 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.
#
##############################################################################
"""Advanced package

Perform important XML import checks.

$Id: __init__.py,v 1.1 2004/04/01 17:09:25 philikon Exp $
"""
_MAXIMUM_XMLMINUS_VERSION = (0, 6, 1)

try:
    import _xmlminus
except ImportError:
    pass
else:
    try:
        v = _xmlminus.version_info
    except AttributeError:
        # _xmlminue is too young; ignore it
        pass
    else:
        if v >= _MAXIMUM_XMLMINUS_VERSION:
            import sys
            sys.modules[__name__] = _xmlminus
        else:
            del v




More information about the Zope3-Checkins mailing list