December 9, 2009

Python 3 - tkinter (Tk Widgets) - BusyBar Busy Indicator

Here is another example GUI application using Python 3.1.

For this example, I used, a module for creating a "busy indicator" (like the knight-rider light). To do this, I first had to port BusyBar to Python 3.1 from 2.x. The new code for this module can be found here:

It renders on Ubuntu (with Gnome) like this:


#!/usr/bin/env python
# Python 3

import tkinter
from tkinter import ttk
import BusyBar

class Application:
    def __init__(self, root):
        self.root = root
        self.root.title('BusyBar Demo')
        ttk.Frame(self.root, width=300, height=100).pack()
        bb = BusyBar.BusyBar(self.root, width=200), y=20)

if __name__ == '__main__':
    root = tkinter.Tk()
Post a Comment