
    ge                      ~    d Z ddlZddlmZ ddlmZmZmZmZm	Z	 ddl
T ddlmZmZ d Zdd	ZeZd
 Z e             dS )a
  Interactive widgets for the Jupyter notebook.

Provide simple interactive controls in the notebook.
Each Widget corresponds to an object in Python and Javascript,
with controls on the page.

To put a Widget on the page, you can display it with IPython's display machinery::

    from ipywidgets import IntSlider
    from IPython.display import display
    slider = IntSlider(min=1, max=10)
    display(slider)

Moving the slider will change the value. Most Widgets have a current value,
accessible as a `value` attribute.
    N)get_ipython   )version_info__version____protocol_version__$__jupyter_widgets_controls_version__ __jupyter_widgets_base_version__)*)linkdlinkc                 R    t          | d          sdS t          | j                   dS )z#Set up IPython to work with widgetskernelN)hasattrregister_comm_targetr   ips    3lib/python3.11/site-packages/ipywidgets/__init__.pyload_ipython_extensionr      s/    2x   #####    c                 z    | t                      j        } | j                            dt          j                   dS )z'Register the jupyter.widget comm targetNzjupyter.widget)r   r   comm_managerregister_targetWidgethandle_comm_opened)r   s    r   r   r   $   s6    ~%
''(8&:STTTTTr   c                  H    t                      } | dS t          |            dS )z=Register with the comm target at import if running in IPythonN)r   r   r   s    r   _handle_ipythonr   -   s)    	B	z2r   )N)__doc__osIPythonr   _versionr   r   r   r   r	   widgets	traitletsr   r   r   r   handle_kernelr    r   r   <module>r%      s    " 
			       N  N  N  N  N  N  N  N  N  N  N  N  N  N     ! ! ! ! ! ! ! !$ $ $U U U U %        r   