Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > UI (User Interfaces)

    progress_meter 1.0

    Download button

    No screenshots available
    Downloads: 110  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Michael Lange and Thomas Kluyver | More programs
    MIT/X Consortium Lic... / FREE
    January 22nd, 2012, 17:07 GMT
    ROOT / Programming / UI (User Interfaces)

     Read user reviews (0)  Refer to a friend  Subscribe

    progress_meter description

    A simple progress bar for long running tasks (Tkinter based)

    progress_meter is a Python module that provides a very simple progress bar for long running tasks.

    The design is somewhat similar to EasyGUI, allowing simple scripts to be GUI-fied without being refactored into callbacks and an event loop. It can naturally be used as an addition to the tools in EasyGUI. The interface can't be quite as simple, but hopefully it's only a little more complex.

    progress_meter is based on this code by Michael Lange.

    The high-level interface looks like this:

    from progress_meter import withprogress

    @withprogress(300, color="green")
    def demo(foo, bar=None):
     for i in range(300):
     # Do one (or a few) steps of processing, then...
     yield i

    demo()


    You can use exceptions to see if the user cancelled the process before it completed:

    try:
     demo()
    except UserCancelled:
     print("Cancelled")
    else:
     print("Completed")


    There's also a lower-level interface in which you instantiate the window directly:

    from progress_meter import MeterWindow

    def _demostep(meter, value):
     meter.set(value)
     if value < 1.0:
     value = value + 0.005
     meter.after(50, lambda: _demostep(meter, value))
     else:
     meter.set(value, 'Demo successfully finished')

    def demo():
     root = MeterWindow(className='meter demo')
     root.meter.set(0.0, 'Starting demo...')
     root.after(1000, lambda: _demostep(root.meter, 0.0))
     root.mainloop()


    To use the progress bar alone in a more complete GUI, you can use the Meter class from this module (which subclasses tkinter.Frame).


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    progress bar | user interface | progress meter | progress | bar | meter

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM