ķ
/žI]c           @   s   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
 Td d l m Z m Z d   Z d d	  Z e Z d
   Z e   d S(   s
  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.
i˙˙˙˙N(   t   get_ipythoni   (   t   version_infot   __version__t   __protocol_version__t$   __jupyter_widgets_controls_version__t    __jupyter_widgets_base_version__(   t   *(   t   linkt   dlinkc         C   s$   t  |  d  s d St |  j  d S(   s#   Set up IPython to work with widgetst   kernelN(   t   hasattrt   register_comm_targetR	   (   t   ip(    (    s2   lib/python2.7/site-packages/ipywidgets/__init__.pyt   load_ipython_extension   s    c         C   s5   |  d k r t   j }  n  |  j j d t j  d S(   s'   Register the jupyter.widget comm targets   jupyter.widgetN(   t   NoneR    R	   t   comm_managert   register_targett   Widgett   handle_comm_opened(   R	   (    (    s2   lib/python2.7/site-packages/ipywidgets/__init__.pyR   $   s    c          C   s'   t    }  |  d k r d St |   d S(   s=   Register with the comm target at import if running in IPythonN(   R    R   R   (   R   (    (    s2   lib/python2.7/site-packages/ipywidgets/__init__.pyt   _handle_ipython-   s    	(   t   __doc__t   ost   IPythonR    t   _versionR   R   R   R   R   t   widgetst	   traitletsR   R   R   R   R   t   handle_kernelR   (    (    (    s2   lib/python2.7/site-packages/ipywidgets/__init__.pyt   <module>   s   (
		