zope.dottedname-3.4.6/0000755000076500000240000000000011253710400014104 5ustar janjaapstaffzope.dottedname-3.4.6/bootstrap.py0000644000076500000240000000337211253710353016507 0ustar janjaapstaff############################################################################## # # Copyright (c) 2006 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. # ############################################################################## """Bootstrap a buildout-based project Simply run this script in a directory containing a buildout.cfg. The script accepts buildout command-line options, so you can use the -c option to specify an alternate configuration file. $Id: bootstrap.py 73113 2007-03-09 11:49:38Z baijum $ """ import os, shutil, sys, tempfile, urllib2 tmpeggs = tempfile.mkdtemp() ez = {} exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) import pkg_resources cmd = 'from setuptools.command.easy_install import main; main()' if sys.platform == 'win32': cmd = '"%s"' % cmd # work around spawn lamosity on windows ws = pkg_resources.working_set assert os.spawnle( os.P_WAIT, sys.executable, sys.executable, '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout', dict(os.environ, PYTHONPATH= ws.find(pkg_resources.Requirement.parse('setuptools')).location ), ) == 0 ws.add_entry(tmpeggs) ws.require('zc.buildout') import zc.buildout.buildout zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) shutil.rmtree(tmpeggs) zope.dottedname-3.4.6/buildout.cfg0000644000076500000240000000014111253710353016417 0ustar janjaapstaff[buildout] develop = . parts = test [test] recipe = zc.recipe.testrunner eggs = zope.dottedname zope.dottedname-3.4.6/CHANGES.txt0000644000076500000240000000112011253710353015716 0ustar janjaapstaffCHANGES ======= 3.4.6 (2009-09-15) ------------------ - Make tests pass on python26. 3.4.5 (2009-01-27) ------------------ - Move README.txt in the egg, so tests works with the released egg as well. 3.4.4 (2009-01-27) ------------------ - Fix ReST in README.txt, fix broken tests with recent zope.testing. 3.4.3 (2008-12-02) ------------------ - More documentation and tests. 3.4.2 (2007-10-02) ------------------ - Fix broken release. 3.4.1 (2007-10-02) ------------------ - Updated package meta-data. 3.4.0 (2007-07-19) ------------------ - Initial Zope-independent release. zope.dottedname-3.4.6/PKG-INFO0000644000076500000240000000706111253710400015205 0ustar janjaapstaffMetadata-Version: 1.0 Name: zope.dottedname Version: 3.4.6 Summary: Resolver for Python dotted names. Home-page: http://pypi.python.org/pypi/zope.dottedname Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: ====================== Dotted Name Resolution ====================== The ``zope.dottedname`` module provides one function, ``resolve`` that resolves strings containing dotted names into the appropriate python object. Dotted names are resolved by importing modules and by getting attributes from imported modules. Names may be relative, provided the module they are relative to is supplied. Here are some examples of importing absolute names:: >>> from zope.dottedname.resolve import resolve >>> resolve('unittest') >>> resolve('datetime.datetime') >>> resolve('datetime.datetime.now') >>> resolve('non existent module') Traceback (most recent call last): ... ImportError: No module named non existent module >>> resolve('__doc__') Traceback (most recent call last): ... ImportError: No module named __doc__ >>> resolve('datetime.foo') Traceback (most recent call last): ... ImportError: No module named foo >>> resolve('os.path.split').__name__ 'split' Here are some examples of importing relative names:: >>> resolve('.split', 'os.path') >>> resolve('..system', 'os.path') >>> resolve('...datetime', 'os.path') NB: When relative names are imported, a module the name is relative to **must** be supplied:: >>> resolve('.split').__name__ Traceback (most recent call last): ... ValueError: relative name without base module CHANGES ======= 3.4.6 (2009-09-15) ------------------ - Make tests pass on python26. 3.4.5 (2009-01-27) ------------------ - Move README.txt in the egg, so tests works with the released egg as well. 3.4.4 (2009-01-27) ------------------ - Fix ReST in README.txt, fix broken tests with recent zope.testing. 3.4.3 (2008-12-02) ------------------ - More documentation and tests. 3.4.2 (2007-10-02) ------------------ - Fix broken release. 3.4.1 (2007-10-02) ------------------ - Updated package meta-data. 3.4.0 (2007-07-19) ------------------ - Initial Zope-independent release. Keywords: resolve dotted name Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.dottedname-3.4.6/setup.cfg0000644000076500000240000000007311253710400015725 0ustar janjaapstaff[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 zope.dottedname-3.4.6/setup.py0000644000076500000240000000447211253710353015634 0ustar janjaapstaff############################################################################## # # Copyright (c) 2007 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. # ############################################################################## # This package is developed by the Zope Toolkit project, documented here: # http://docs.zope.org/zopetoolkit # When developing and releasing this package, please follow the documented # Zope Toolkit policies as described by this documentation. ############################################################################## """ $Id: setup.py 104061 2009-09-15 13:04:15Z janjaapdriessen $ """ import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() setup(name="zope.dottedname", version = '3.4.6', author='Zope Corporation and Contributors', author_email='zope-dev@zope.org', description='Resolver for Python dotted names.', long_description='\n\n'.join(( read('src', 'zope', 'dottedname', 'README.txt'), read('CHANGES.txt'), )), keywords = 'resolve dotted name', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Zope Public License', 'Programming Language :: Python', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', 'Framework :: Zope3'], url='http://pypi.python.org/pypi/zope.dottedname', license='ZPL 2.1', packages=find_packages('src'), package_dir = {'': 'src'}, namespace_packages=['zope'], extras_require = dict( test=['zope.testing'], ), install_requires = ['setuptools'], include_package_data=True, zip_safe = False ) zope.dottedname-3.4.6/src/0000755000076500000240000000000011253710400014673 5ustar janjaapstaffzope.dottedname-3.4.6/src/zope/0000755000076500000240000000000011253710400015650 5ustar janjaapstaffzope.dottedname-3.4.6/src/zope/__init__.py0000644000076500000240000000007011253710353017765 0ustar janjaapstaff__import__('pkg_resources').declare_namespace(__name__) zope.dottedname-3.4.6/src/zope/dottedname/0000755000076500000240000000000011253710400017774 5ustar janjaapstaffzope.dottedname-3.4.6/src/zope/dottedname/__init__.py0000644000076500000240000000000211253710353022104 0ustar janjaapstaff# zope.dottedname-3.4.6/src/zope/dottedname/README.txt0000644000076500000240000000305211253710353021501 0ustar janjaapstaff====================== Dotted Name Resolution ====================== The ``zope.dottedname`` module provides one function, ``resolve`` that resolves strings containing dotted names into the appropriate python object. Dotted names are resolved by importing modules and by getting attributes from imported modules. Names may be relative, provided the module they are relative to is supplied. Here are some examples of importing absolute names:: >>> from zope.dottedname.resolve import resolve >>> resolve('unittest') >>> resolve('datetime.datetime') >>> resolve('datetime.datetime.now') >>> resolve('non existent module') Traceback (most recent call last): ... ImportError: No module named non existent module >>> resolve('__doc__') Traceback (most recent call last): ... ImportError: No module named __doc__ >>> resolve('datetime.foo') Traceback (most recent call last): ... ImportError: No module named foo >>> resolve('os.path.split').__name__ 'split' Here are some examples of importing relative names:: >>> resolve('.split', 'os.path') >>> resolve('..system', 'os.path') >>> resolve('...datetime', 'os.path') NB: When relative names are imported, a module the name is relative to **must** be supplied:: >>> resolve('.split').__name__ Traceback (most recent call last): ... ValueError: relative name without base module zope.dottedname-3.4.6/src/zope/dottedname/resolve.py0000644000076500000240000000245111253710353022036 0ustar janjaapstaff############################################################################## # # Copyright (c) 2004 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. # ############################################################################## """Dotted name support $Id: resolve.py 38682 2005-09-29 09:12:45Z jim $ """ def resolve(name, module=None): name = name.split('.') if not name[0]: if module is None: raise ValueError("relative name without base module") module = module.split('.') name.pop(0) while not name[0]: module.pop() name.pop(0) name = module + name used = name.pop(0) found = __import__(used) for n in name: used += '.' + n try: found = getattr(found, n) except AttributeError: __import__(used) found = getattr(found, n) return found zope.dottedname-3.4.6/src/zope/dottedname/tests.py0000644000076500000240000000220411253710353021515 0ustar janjaapstaff############################################################################## # # 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. # ############################################################################## """test resolution of dotted names $Id: tests.py 95202 2009-01-27 14:15:28Z thefunny42 $ """ import os,unittest from zope.testing.doctest import DocFileSuite,REPORT_NDIFF,ELLIPSIS def test_suite(): return unittest.TestSuite(( DocFileSuite( os.path.abspath(os.path.join(os.path.dirname(__file__), 'README.txt')), optionflags=REPORT_NDIFF|ELLIPSIS, module_relative=False, ), )) if __name__ == '__main__': unittest.main(defaultTest='test_suite') zope.dottedname-3.4.6/src/zope.dottedname.egg-info/0000755000076500000240000000000011253710400021465 5ustar janjaapstaffzope.dottedname-3.4.6/src/zope.dottedname.egg-info/dependency_links.txt0000644000076500000240000000000111253710374025545 0ustar janjaapstaff zope.dottedname-3.4.6/src/zope.dottedname.egg-info/namespace_packages.txt0000644000076500000240000000000511253710374026025 0ustar janjaapstaffzope zope.dottedname-3.4.6/src/zope.dottedname.egg-info/not-zip-safe0000644000076500000240000000000111253710361023721 0ustar janjaapstaff zope.dottedname-3.4.6/src/zope.dottedname.egg-info/PKG-INFO0000644000076500000240000000706111253710374022600 0ustar janjaapstaffMetadata-Version: 1.0 Name: zope.dottedname Version: 3.4.6 Summary: Resolver for Python dotted names. Home-page: http://pypi.python.org/pypi/zope.dottedname Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: ====================== Dotted Name Resolution ====================== The ``zope.dottedname`` module provides one function, ``resolve`` that resolves strings containing dotted names into the appropriate python object. Dotted names are resolved by importing modules and by getting attributes from imported modules. Names may be relative, provided the module they are relative to is supplied. Here are some examples of importing absolute names:: >>> from zope.dottedname.resolve import resolve >>> resolve('unittest') >>> resolve('datetime.datetime') >>> resolve('datetime.datetime.now') >>> resolve('non existent module') Traceback (most recent call last): ... ImportError: No module named non existent module >>> resolve('__doc__') Traceback (most recent call last): ... ImportError: No module named __doc__ >>> resolve('datetime.foo') Traceback (most recent call last): ... ImportError: No module named foo >>> resolve('os.path.split').__name__ 'split' Here are some examples of importing relative names:: >>> resolve('.split', 'os.path') >>> resolve('..system', 'os.path') >>> resolve('...datetime', 'os.path') NB: When relative names are imported, a module the name is relative to **must** be supplied:: >>> resolve('.split').__name__ Traceback (most recent call last): ... ValueError: relative name without base module CHANGES ======= 3.4.6 (2009-09-15) ------------------ - Make tests pass on python26. 3.4.5 (2009-01-27) ------------------ - Move README.txt in the egg, so tests works with the released egg as well. 3.4.4 (2009-01-27) ------------------ - Fix ReST in README.txt, fix broken tests with recent zope.testing. 3.4.3 (2008-12-02) ------------------ - More documentation and tests. 3.4.2 (2007-10-02) ------------------ - Fix broken release. 3.4.1 (2007-10-02) ------------------ - Updated package meta-data. 3.4.0 (2007-07-19) ------------------ - Initial Zope-independent release. Keywords: resolve dotted name Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.dottedname-3.4.6/src/zope.dottedname.egg-info/requires.txt0000644000076500000240000000003711253710374024077 0ustar janjaapstaffsetuptools [test] zope.testingzope.dottedname-3.4.6/src/zope.dottedname.egg-info/SOURCES.txt0000644000076500000240000000076211253710374023370 0ustar janjaapstaffCHANGES.txt bootstrap.py buildout.cfg setup.py src/zope/__init__.py src/zope.dottedname.egg-info/PKG-INFO src/zope.dottedname.egg-info/SOURCES.txt src/zope.dottedname.egg-info/dependency_links.txt src/zope.dottedname.egg-info/namespace_packages.txt src/zope.dottedname.egg-info/not-zip-safe src/zope.dottedname.egg-info/requires.txt src/zope.dottedname.egg-info/top_level.txt src/zope/dottedname/README.txt src/zope/dottedname/__init__.py src/zope/dottedname/resolve.py src/zope/dottedname/tests.pyzope.dottedname-3.4.6/src/zope.dottedname.egg-info/top_level.txt0000644000076500000240000000000511253710374024224 0ustar janjaapstaffzope