From Python
Jump to: navigation, search

PySpeed - flexible progress bars for python


This is a temporary wiki for the PySpeed project.

It is mainly here because I did not find a proper place to put screenshots :-)

You are free to use this page for any purpose related to the project.

PySpeed is now available on the Python Package Index
If you have setuptools installed, just type

easy_install PySpeed

And type the examples below in an interactive interpreter...


Textual progress bar (in IPython)

Ipython speed.png

Graphical progress bar (nested)

Gtk speed.png

Was produced by the following code:

  1. import speed
  3. for i in speed.gprogress(xrange(5)):
  4.     for j in speed.gprogress(xrange(5000000)): pass

Help required

  • Make a nice logo (flying snake? Foot with wings?)
  • Documentation (basic uses is understandable from screenshots, but there are several undocumented features).
  • Testing on Windows (note that currently the GTK interface is not expected to work well there).
    (in particular, need to make bprogress (the Frozen Bubble progress bar) work there :-) )
  • Support other GUI toolkits (add wprogress(), kprogress(), tkprogress() ...)

Known Issues

Threading model

Currently, PySpeed targets usage in interactive interprepters, and in non-GUI scripts.

The GTK interface is threaded, and might not work in programs that use GTK GUI.

AFAIK, it might not work with Windows GTK as well.

Instead of running the GTK mainloop in a separate thread, we should probably explicitly poll the GTK queue at reasonable intervals.

speedConfig interface

The speedConfig() / speed() / xrange() interface is untested. Known problem: It seems that if you have active textual iteration contexts, you cannot speedConfig(vis='graph') (and vice versa). This is due to some problems related to the usage of weakref proxies.

Support for multiple, named, windows

I have some thoughts in this direction, but no time to implement. Contact me for details.

Personal tools