Git Product home page Git Product logo

ipy-progressbar's Introduction

Introduction

ipy-progressbar allows to use the same code for rich progressbars in IPython Notebooks, and for simple fallback ones in terminal sessions.

Example

Code like this:

from ipy_progressbar import ProgressBar

pb = ProgressBar(10, title='Outer')
pb_inner = ProgressBar(5, title='Inner')
for i in pb:)
    for j in pb_inner:
        # inner loop body

will work both in IPython Notebook and in plain console. When run in notebook, the output will be rich (Bootstrap progress bars), while console version is mainly thought of as a fallback.

For more examples see example.py and example.ipynb.

ipy-progressbar's People

Contributors

aplavin avatar sheiksadique avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sheiksadique

ipy-progressbar's Issues

Problem with Notebook 5.0.0

Hi,
I have following problem. I updated Jupyter Notebook to version 5.0.0 and ipywidgets to 6.0.0.
The results is that error. I hope that this project is still active.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-7c46868a65e1> in <module>()
----> 1 pb = ProgressBarIPyNb(5, title='Outer')
      2 pb_inner = ProgressBarIPyNb(5, title='Inner')
      3 for i in pb:
      4     for j in pb_inner:
      5         sleep(0.5 * random())

/usr/local/lib/python3.4/dist-packages/ipy_progressbar/ipynb_bar.py in __init__(self, iterable_or_max, title, format_str)
     21         self.log_w = iw.HTML()
     22         self.log_header_w = iw.HTML('<h2><small>Log messages</small></h2>')
---> 23         directional_link((self.log_check_w, 'value'), (self.log_w, 'visible'))
     24         directional_link((self.log_check_w, 'value'), (self.log_header_w, 'visible'))
     25 

/usr/local/lib/python3.4/dist-packages/traitlets/traitlets.py in __init__(self, source, target, transform)
    324     def __init__(self, source, target, transform=None):
    325         self._transform = transform if transform else lambda x: x
--> 326         _validate_link(source, target)
    327         self.source, self.target = source, target
    328         try:

/usr/local/lib/python3.4/dist-packages/traitlets/traitlets.py in _validate_link(*tuples)
    250             raise TypeError("Each object must be HasTraits, not %r" % type(obj))
    251         if not trait_name in obj.traits():
--> 252             raise TypeError("%r has no trait %r" % (obj, trait_name))
    253 
    254 class link(object):

TypeError: <ipywidgets.widgets.widget_string.HTML object at 0x7febec3149b0> has no trait 'visible'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.