In [1]:
import ipywidgets

In [2]:
help(ipywidgets)


Help on package ipywidgets:

NAME
    ipywidgets

PACKAGE CONTENTS
    _version
    install
    jstest
    widgets (package)

SUBMODULES
    eventful
    interaction
    trait_types
    widget
    widget_bool
    widget_box
    widget_button
    widget_color
    widget_controller
    widget_float
    widget_image
    widget_int
    widget_link
    widget_output
    widget_selection
    widget_selectioncontainer
    widget_string

CLASSES
    ipywidgets.widgets.widget.Widget(traitlets.config.configurable.LoggingConfigurable)
        CommInfo
    
    class CommInfo(ipywidgets.widgets.widget.Widget)
     |  CommInfo widgets are is typically instantiated by the front-end.
     |  
     |  As soon as it is instantiated, it sends the collection of valid comms, and
     |  kills itself. It is a workaround to the absence of comm_info shell
     |  message.
     |  
     |  Method resolution order:
     |      CommInfo
     |      ipywidgets.widgets.widget.Widget
     |      traitlets.config.configurable.LoggingConfigurable
     |      traitlets.config.configurable.Configurable
     |      traitlets.traitlets.HasTraits
     |      traitlets.traitlets._NewBase
     |      traitlets.traitlets.HasDescriptors
     |      traitlets.traitlets._NewBase
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, **kwargs)
     |      Public constructor
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from ipywidgets.widgets.widget.Widget:
     |  
     |  __del__(self)
     |      Object disposal
     |  
     |  add_traits(self, **traits)
     |      Dynamically add trait attributes to the Widget.
     |  
     |  close(self)
     |      Close method.
     |      
     |      Closes the underlying comm.
     |      When the comm is closed, all of the widget views are automatically
     |      removed from the front-end.
     |  
     |  get_state(self, key=None)
     |      Gets the widget state, or a piece of it.
     |      
     |      Parameters
     |      ----------
     |      key : unicode or iterable (optional)
     |          A single property's name or iterable of property names to get.
     |      
     |      Returns
     |      -------
     |      state : dict of states
     |      metadata : dict
     |          metadata for each field: {key: metadata}
     |  
     |  hold_sync(self)
     |      Hold syncing any state until the outermost context manager exits
     |  
     |  on_displayed(self, callback, remove=False)
     |      (Un)Register a widget displayed callback.
     |      
     |      Parameters
     |      ----------
     |      callback: method handler
     |          Must have a signature of::
     |      
     |              callback(widget, **kwargs)
     |      
     |          kwargs from display are passed through without modification.
     |      remove: bool
     |          True if the callback should be unregistered.
     |  
     |  on_msg(self, callback, remove=False)
     |      (Un)Register a custom msg receive callback.
     |      
     |      Parameters
     |      ----------
     |      callback: callable
     |          callback will be passed three arguments when a message arrives::
     |      
     |              callback(widget, content, buffers)
     |      
     |      remove: bool
     |          True if the callback should be unregistered.
     |  
     |  open(self)
     |      Open a comm to the frontend if one isn't already open.
     |  
     |  send(self, content, buffers=None)
     |      Sends a custom msg to the widget model in the front-end.
     |      
     |      Parameters
     |      ----------
     |      content : dict
     |          Content of the message to send.
     |      buffers : list of binary buffers
     |          Binary buffers to send with message
     |  
     |  send_state(self, key=None)
     |      Sends the widget state, or a piece of it, to the front-end.
     |      
     |      Parameters
     |      ----------
     |      key : unicode, or iterable (optional)
     |          A single property's name or iterable of property names to sync with the front-end.
     |  
     |  set_state(self, sync_data)
     |      Called when a state is received from the front-end.
     |  
     |  ----------------------------------------------------------------------
     |  Static methods inherited from ipywidgets.widgets.widget.Widget:
     |  
     |  handle_comm_opened(comm, msg)
     |      Static method, called when a widget is constructed.
     |  
     |  on_widget_constructed(callback)
     |      Registers a callback to be called when a widget is constructed.
     |      
     |      The callback must have the following signature:
     |      callback(widget)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from ipywidgets.widgets.widget.Widget:
     |  
     |  comm
     |      A trait whose value must be an instance of a specified class.
     |      
     |      The value can also be an instance of a subclass of the specified class.
     |      
     |      Subclasses can declare default classes by overriding the klass attribute
     |  
     |  keys
     |      An instance of a Python list.
     |  
     |  model_id
     |      Gets the model id of this widget.
     |      
     |      If a Comm doesn't exist yet, a Comm will be created automagically.
     |  
     |  msg_throttle
     |      An int trait.
     |  
     |  version
     |      An int trait.
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from ipywidgets.widgets.widget.Widget:
     |  
     |  widget_types = {'IPython.Accordion': <class 'ipywidgets.widgets.widget...
     |  
     |  widgets = {}
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from traitlets.config.configurable.LoggingConfigurable:
     |  
     |  log
     |      A trait whose value must be an instance of a specified class.
     |      
     |      The value can also be an instance of a subclass of the specified class.
     |      
     |      Subclasses can declare default classes by overriding the klass attribute
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from traitlets.config.configurable.Configurable:
     |  
     |  update_config(self, config)
     |      Update config and load the new values
     |  
     |  ----------------------------------------------------------------------
     |  Class methods inherited from traitlets.config.configurable.Configurable:
     |  
     |  class_config_rst_doc() from traitlets.traitlets.MetaHasTraits
     |      Generate rST documentation for this class' config options.
     |      
     |      Excludes traits defined on parent classes.
     |  
     |  class_config_section() from traitlets.traitlets.MetaHasTraits
     |      Get the config class config section
     |  
     |  class_get_help(inst=None) from traitlets.traitlets.MetaHasTraits
     |      Get the help string for this class in ReST format.
     |      
     |      If `inst` is given, it's current trait values will be used in place of
     |      class defaults.
     |  
     |  class_get_trait_help(trait, inst=None) from traitlets.traitlets.MetaHasTraits
     |      Get the help string for a single trait.
     |      
     |      If `inst` is given, it's current trait values will be used in place of
     |      the class default.
     |  
     |  class_print_help(inst=None) from traitlets.traitlets.MetaHasTraits
     |      Get the help string for a single trait and print it.
     |  
     |  section_names() from traitlets.traitlets.MetaHasTraits
     |      return section names as a list
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from traitlets.config.configurable.Configurable:
     |  
     |  config
     |      A trait whose value must be an instance of a specified class.
     |      
     |      The value can also be an instance of a subclass of the specified class.
     |      
     |      Subclasses can declare default classes by overriding the klass attribute
     |  
     |  parent
     |      A trait whose value must be an instance of a specified class.
     |      
     |      The value can also be an instance of a subclass of the specified class.
     |      
     |      Subclasses can declare default classes by overriding the klass attribute
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from traitlets.traitlets.HasTraits:
     |  
     |  __getstate__(self)
     |  
     |  __setstate__(self, state)
     |  
     |  has_trait(self, name)
     |      Returns True if the object has a trait with the specified name.
     |  
     |  hold_trait_notifications(self)
     |      Context manager for bundling trait change notifications and cross
     |      validation.
     |      
     |      Use this when doing multiple trait assignments (init, config), to avoid
     |      race conditions in trait notifiers requesting other trait values.
     |      All trait notifications will fire after all values have been assigned.
     |  
     |  notify_change(self, change)
     |  
     |  observe(self, handler, names=traitlets.All, type='change')
     |      Setup a handler to be called when a trait changes.
     |      
     |      This is used to setup dynamic notifications of trait changes.
     |      
     |      Parameters
     |      ----------
     |      handler : callable
     |          A callable that is called when a trait changes. Its
     |          signature should be ``handler(change)``, where ``change```is a
     |          dictionary. The change dictionary at least holds a 'type' key.
     |          * ``type``: the type of notification.
     |          Other keys may be passed depending on the value of 'type'. In the
     |          case where type is 'change', we also have the following keys:
     |          * ``owner`` : the HasTraits instance
     |          * ``old`` : the old value of the modified trait attribute
     |          * ``new`` : the new value of the modified trait attribute
     |          * ``name`` : the name of the modified trait attribute.
     |      names : list, str, All
     |          If names is All, the handler will apply to all traits.  If a list
     |          of str, handler will apply to all names in the list.  If a
     |          str, the handler will apply just to that name.
     |      type : str, All (default: 'change')
     |          The type of notification to filter by. If equal to All, then all
     |          notifications are passed to the observe handler.
     |  
     |  on_trait_change(self, handler=None, name=None, remove=False)
     |      DEPRECATED: Setup a handler to be called when a trait changes.
     |      
     |      This is used to setup dynamic notifications of trait changes.
     |      
     |      Static handlers can be created by creating methods on a HasTraits
     |      subclass with the naming convention '_[traitname]_changed'.  Thus,
     |      to create static handler for the trait 'a', create the method
     |      _a_changed(self, name, old, new) (fewer arguments can be used, see
     |      below).
     |      
     |      If `remove` is True and `handler` is not specified, all change
     |      handlers for the specified name are uninstalled.
     |      
     |      Parameters
     |      ----------
     |      handler : callable, None
     |          A callable that is called when a trait changes.  Its
     |          signature can be handler(), handler(name), handler(name, new),
     |          handler(name, old, new), or handler(name, old, new, self).
     |      name : list, str, None
     |          If None, the handler will apply to all traits.  If a list
     |          of str, handler will apply to all names in the list.  If a
     |          str, the handler will apply just to that name.
     |      remove : bool
     |          If False (the default), then install the handler.  If True
     |          then unintall it.
     |  
     |  set_trait(self, name, value)
     |      Forcibly sets trait attribute, including read-only attributes.
     |  
     |  setup_instance(self, *args, **kwargs)
     |      This is called **before** self.__init__ is called.
     |  
     |  trait_metadata(self, traitname, key, default=None)
     |      Get metadata values for trait by key.
     |  
     |  trait_names(self, **metadata)
     |      Get a list of all the names of this class' traits.
     |  
     |  traits(self, **metadata)
     |      Get a ``dict`` of all the traits of this class.  The dictionary
     |      is keyed on the name and the values are the TraitType objects.
     |      
     |      The TraitTypes returned don't know anything about the values
     |      that the various HasTrait's instances are holding.
     |      
     |      The metadata kwargs allow functions to be passed in which
     |      filter traits based on metadata values.  The functions should
     |      take a single value as an argument and return a boolean.  If
     |      any function returns False, then the trait is not included in
     |      the output.  If a metadata key doesn't exist, None will be passed
     |      to the function.
     |  
     |  unobserve(self, handler, names=traitlets.All, type='change')
     |      Remove a trait change handler.
     |      
     |      This is used to unregister handlers to trait change notificiations.
     |      
     |      Parameters
     |      ----------
     |      handler : callable
     |          The callable called when a trait attribute changes.
     |      names : list, str, All (default: All)
     |          The names of the traits for which the specified handler should be
     |          uninstalled. If names is All, the specified handler is uninstalled
     |          from the list of notifiers corresponding to all changes.
     |      type : str or All (default: 'change')
     |          The type of notification to filter by. If All, the specified handler
     |          is uninstalled from the list of notifiers corresponding to all types.
     |  
     |  unobserve_all(self, name=traitlets.All)
     |      Remove trait change handlers of any type for the specified name.
     |      If name is not specified, removes all trait notifiers.
     |  
     |  ----------------------------------------------------------------------
     |  Class methods inherited from traitlets.traitlets.HasTraits:
     |  
     |  class_own_traits(**metadata) from traitlets.traitlets.MetaHasTraits
     |      Get a dict of all the traitlets defined on this class, not a parent.
     |      
     |      Works like `class_traits`, except for excluding traits from parents.
     |  
     |  class_trait_names(**metadata) from traitlets.traitlets.MetaHasTraits
     |      Get a list of all the names of this class' traits.
     |      
     |      This method is just like the :meth:`trait_names` method,
     |      but is unbound.
     |  
     |  class_traits(**metadata) from traitlets.traitlets.MetaHasTraits
     |      Get a ``dict`` of all the traits of this class.  The dictionary
     |      is keyed on the name and the values are the TraitType objects.
     |      
     |      This method is just like the :meth:`traits` method, but is unbound.
     |      
     |      The TraitTypes returned don't know anything about the values
     |      that the various HasTrait's instances are holding.
     |      
     |      The metadata kwargs allow functions to be passed in which
     |      filter traits based on metadata values.  The functions should
     |      take a single value as an argument and return a boolean.  If
     |      any function returns False, then the trait is not included in
     |      the output.  If a metadata key doesn't exist, None will be passed
     |      to the function.
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from traitlets.traitlets.HasTraits:
     |  
     |  cross_validation_lock
     |      A contextmanager for running a block with our cross validation lock set
     |      to True.
     |      
     |      At the end of the block, the lock's value is restored to its value
     |      prior to entering the block.
     |  
     |  ----------------------------------------------------------------------
     |  Static methods inherited from traitlets.traitlets.HasDescriptors:
     |  
     |  __new__(cls, *args, **kwargs)
     |      Create and return a new object.  See help(type) for accurate signature.
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from traitlets.traitlets._NewBase:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    find_static_assets()
        Return the path to static assets for widgets (js, css)
    
    handle_kernel = register_comm_target(kernel=None)
        Register the ipython.widget comm target
    
    load_ipython_extension(ip)
        Set up IPython to work with widgets
    
    register_comm_target(kernel=None)
        Register the ipython.widget comm target

DATA
    version_info = (4, 1, 1)
    widget_serialization = {'from_json': <function _json_to_widget>, 'to_j...

VERSION
    4.1.1

FILE
    /home/supermap/anaconda3/envs/GISpark/lib/python3.5/site-packages/ipywidgets/__init__.py



In [4]:
!ls -l *.ipynb


-rw-rw-r-- 1 supermap supermap   86420  4月 27 15:12 aiyagari_continuous_time.ipynb
-rw-rw-r-- 1 supermap supermap    5994  4月 19 22:07 chronospy.ipynb
-rw-rw-r-- 1 supermap supermap   82622  4月 27 15:12 dataframes_examples.ipynb
-rw-rw-r-- 1 supermap supermap    1183  3月 23 12:47 filewrite.ipynb
-rw-rw-r-- 1 supermap supermap 1047704  4月 27 15:12 guardian_gaza.ipynb
-rw-rw-r-- 1 supermap supermap  527574  4月 27 15:12 IntroToStan_basics_workflow.ipynb
-rw-rw-r-- 1 supermap supermap    1089  3月 21 14:45 ipyparallel.ipynb
-rw-rw-r-- 1 supermap supermap   22408  4月 27 15:12 regression_models.ipynb
-rw-rw-r-- 1 supermap supermap    3068  4月 23 08:51 sched-test.ipynb
-rw-rw-r-- 1 supermap supermap    8602  4月 27 15:12 tf-image.ipynb
-rw-rw-r-- 1 supermap supermap   42777  4月 27 15:12 tf-word2vec.ipynb
-rw-rw-r-- 1 supermap supermap      72  4月 28 09:31 Untitled.ipynb
-rw-rw-r-- 1 supermap supermap  131879  4月 27 15:12 股票技術分析.ipynb

In [8]:
%ls -l


总用量 2060
-rw-rw-r--  1 supermap supermap   86420  4月 27 15:12 aiyagari_continuous_time.ipynb
drwxrwxr-x  2 supermap supermap    4096  4月 19 22:07 chronos/
-rw-rw-r--  1 supermap supermap    5994  4月 19 22:07 chronospy.ipynb
-rwxrwxr-x  1 supermap supermap      88  4月 19 22:07 chronospy-setup.sh*
drwxrwxr-x  4 supermap supermap    4096  4月 27 13:29 cloud-python/
drwxrwxr-x  3 supermap supermap    4096  4月 27 13:46 cse6040-ipynbs/
-rw-rw-r--  1 supermap supermap   82622  4月 27 15:12 dataframes_examples.ipynb
-rw-rw-r--  1 supermap supermap    1183  3月 23 12:47 filewrite.ipynb
-rw-rw-r--  1 supermap supermap 1047704  4月 27 15:12 guardian_gaza.ipynb
-rw-rw-r--  1 supermap supermap  527574  4月 27 15:12 IntroToStan_basics_workflow.ipynb
drwxrwxr-x  6 supermap supermap    4096  4月 27 13:27 ipynb-docker/
drwxrwxr-x  4 supermap supermap    4096  4月 27 14:30 ipynb-examples/
drwxrwxr-x  4 supermap supermap    4096  4月 27 10:40 ipynb-file/
-rw-rw-r--  1 supermap supermap    1089  3月 21 14:45 ipyparallel.ipynb
drwxrwxr-x  9 supermap supermap    4096  4月 28 06:41 ipython/
-rw-rw-r--  1 supermap supermap   25255  4月 28 09:33 ipywidget_test.ipynb
drwxrwxr-x  4 supermap supermap    4096  4月 27 10:58 learn-pandas/
drwxrwxr-x  6 supermap supermap    4096  4月 27 13:16 Mining-the-Social-Web-2nd-Edition/
-rw-rw-r--  1 supermap supermap     261  4月 28 09:27 ml_tutorial.md
-rw-rw-r--  1 supermap supermap     219  4月 28 09:24 ml_tutorial.md~
drwxrwxr-x  4 supermap supermap    4096  4月 27 14:10 nbsphinx/
drwxrwxr-x  5 supermap supermap    4096  4月 27 10:44 pandas-cookbook/
drwxrwxr-x 14 supermap supermap    4096  4月 27 15:23 Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
drwxrwxr-x  5 supermap supermap    4096  4月 27 14:08 py4fi/
drwxrwxr-x  2 supermap supermap    4096  4月 27 10:45 pyadvanced/
drwxrwxr-x  3 supermap supermap    4096  4月 27 12:38 pystart/
-rw-rw-r--  1 supermap supermap    2298  4月 27 16:57 readme.md
-rw-rw-r--  1 supermap supermap    2298  4月 27 15:19 readme.md~
-rw-rw-r--  1 supermap supermap   22408  4月 27 15:12 regression_models.ipynb
-rw-rw-r--  1 supermap supermap    3068  4月 23 08:51 sched-test.ipynb
-rw-rw-r--  1 supermap supermap     515  4月 19 22:07 schedule.py
-rw-rw-r--  1 supermap supermap      19  3月 23 12:44 test.txt
-rw-rw-r--  1 supermap supermap    8602  4月 27 15:12 tf-image.ipynb
-rw-rw-r--  1 supermap supermap   42777  4月 27 15:12 tf-word2vec.ipynb
-rw-rw-r--  1 supermap supermap  131879  4月 27 15:12 股票技術分析.ipynb

In [ ]: