a
    ©ˆc4  ã                   @   sD   d Z ddlZddlmZmZ ddlmZ eeƒG dd„ deƒƒZdS )z, The default import manager implementation. é    N)Ú	HasTraitsÚprovidesé   )ÚIImportManagerc                   @   s   e Zd ZdZdd„ ZdS )ÚImportManagerzæ The default import manager implementation.

    Its just a guess, but I think using an import manager to do all imports
    will make debugging easier (as opposed to just letting imports happen from
    all over the place).

    c                 C   sz   d|v r.|  d¡\}}t |¡}t||jƒ}nB|  d¡}d |dd… ¡}|d }t|tƒ tƒ |gƒ}t	||ƒ}|| _
|S )z9 Import the symbol defined by the specified symbol path. ú:Ú.Néÿÿÿÿ)ÚsplitÚ	importlibÚimport_moduleÚevalÚ__dict__ÚjoinÚ
__import__ÚglobalsÚlocalsÚgetattrZsymbol_imported)ÚselfZsymbol_pathÚmodule_nameZsymbol_nameÚmoduleÚsymbolÚ
components© r   úZ/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/envisage/import_manager.pyÚimport_symbol#   s    

ÿ
zImportManager.import_symbolN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s   r   )r   r   Z
traits.apir   r   Zi_import_managerr   r   r   r   r   r   Ú<module>
   s
   