
    _dg                         d Z d Zy)z:
A simple utility to import something by its string name.
c                 &   t        | t              st        dt        |       z        | j	                  dd      }t        |      dk(  r"|\  }}t        ||g      }	 t        ||      }|S t        |d         S # t        $ r t        d|z        w xY w)a  Import and return ``bar`` given the string ``foo.bar``.

    Calling ``bar = import_item("foo.bar")`` is the functional equivalent of
    executing the code ``from foo import bar``.

    Parameters
    ----------
    name : string
        The fully qualified name of the module/package being imported.

    Returns
    -------
    mod : module object
        The module that was imported.
    z&import_item accepts strings, not '%s'..      )fromlistzNo module named %s    )

isinstancestr	TypeErrortypersplitlen
__import__getattrAttributeErrorImportError)namepartspackageobjmodulepaks         >/usr/lib/python3/dist-packages/traitlets/utils/importstring.pyimport_itemr      s      dC @4:MNNKKQE
5zQGse4	:&#&C 
 %(##  	:2S899	:s   A8 8BN)__doc__r        r   <module>r      s   $r   