a
    lc                     @   s   d Z dd ZdS )z:
A simple utility to import something by its string name.
c              
   C   s   |  dd}t|dkrt|\}}t||gd}zt||}W n2 tyn } ztd| |W Y d}~n
d}~0 0 |S t|d S dS )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.
    .      )fromlistzNo module named %sN    )rsplitlen
__import__getattrAttributeErrorImportError)namepartspackageobjmodulepake r   V/var/www/html/django/DPS/env/lib/python3.9/site-packages/IPython/utils/importstring.pyimport_item
   s    $r   N)__doc__r   r   r   r   r   <module>   s   