| Server IP : 217.160.0.135 / Your IP : 216.73.217.25 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/traitlets/utils/__pycache__/ |
Upload File : |
�
�Ucg � � � d Z d� ZdS )z:
A simple utility to import something by its string name.
c �| � t | t � � st dt | � � z � � �| � dd� � }t |� � dk rK|\ }}t
||g�� � } t ||� � }n # t $ r t d|z � � �w xY w|S t
|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.
z&import_item accepts strings, not '%s'.�.� � )�fromlistzNo 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� � � �d�C� � � O��@�4��:�:�M�N�N�N��K�K��Q���E�
�5�z�z�Q��������G�s�e�4�4�4�� :��&�#�&�&�C�C��� :� :� :��2�S�8�9�9�9� :�����
� �%��(�#�#�#s �6B �B$N)�__doc__r � � r �<module>r s( ��� �$� $� $� $� $r