'Update the progress bar to the given value (out of a total
given to the constructor).
This method is for use in the IPython notebook 2+.'

def _update_ipython_widget(self, value=None):

    if (not hasattr(self, u'_widget')):
        from IPython import version_info
        if (version_info[0] < 4):
            from IPython.html import widgets
            self._widget = widgets.FloatProgressWidget()
        else:
            _IPython.get_ipython()
            from ipywidgets import widgets
            self._widget = widgets.FloatProgress()
        from IPython.display import display
        display(self._widget)
        self._widget.value = 0
    frac = (value / self._total)
    self._widget.value = (frac * 100)
    self._widget.description = u'    ({:>6.2%})'.format(frac)
