o
    ¢ØÆhJ  ã                   @   s.   d dl mZ d dlmZ dedefdd„ZdS )é    )Úimport_module)ÚAnyÚdotted_pathÚreturnc                 C   st   z
|   dd¡\}}W n ty   | › d�}t|ƒ‚w t|ƒ}zt||ƒW S  ty9   d|› d|› d�}t|ƒ‚w )a  
    Import a variable using its path and name.

    :param dotted_path: dotted module path and variable/class name
    :return: the attribute/class designated by the last name in the path
    :raise: ImportError, if the import failed

    Source: django.utils.module_loading
    Ú.é   z  doesn't look like a module pathzModule "z" does not define a "z" attribute/class)ÚrsplitÚ
ValueErrorÚImportErrorr   ÚgetattrÚAttributeError)r   Úmodule_pathÚ
class_nameÚmsgÚmodule© r   úe/var/www/html/HyperOracle/crypto_trader/venv/lib/python3.10/site-packages/eth_utils/module_loading.pyÚimport_string	   s   

þþr   N)Ú	importlibr   Útypingr   Ústrr   r   r   r   r   Ú<module>   s    