File: //opt/alt/python27/lib/python2.7/site-packages/paste/util/import_string.pyc
�
b�Nc @ s. d Z d � Z d � Z d � Z d � Z d S( s�
'imports' a string -- converts a string to a Python object, importing
any necessary modules and evaluating the expression. Everything
before the : in an import expression is the module path; everything
after is an expression to be evaluated in the namespace of that
module.
Alternately, if no : is present, then import the modules and get the
attributes as necessary. Arbitrary expressions are not allowed in
that case.
c C sP d | k r t | � S| j d d � \ } } t | � } t | | j � } | S( s*
Import a module, or import an object from a module.
A module name like ``foo.bar:baz()`` can be used, where
``foo.bar`` is the module, and ``baz()`` is an expression
evaluated in the context of that module. Note this is not safe on
arbitrary strings because of the eval.
t :i ( t
simple_importt splitt
import_modulet evalt __dict__( t st module_namet exprt modulet obj( ( sI /opt/alt/python27/lib/python2.7/site-packages/paste/util/import_string.pyt eval_import s
c C s� | j d � } t | d � } | d } | d } d } xS | r� | d | d 7} y t | � } | d } Wq<