Python Codes

Progress Bar in Python

Indian Bloggers

Applications would need a progress bar while the task is in progress. Python has a simple way of doing it using tkinter. Here are the specs this code adheres to:

Python version – 3.4
Front end using – tkinter

Here is how the output looks like:


from tkinter import *
import tkinter.ttk as ttk

# Get the Tk instance
root = Tk()

# Set the layout dimension

# Title the window
root.title("Progress Bar Demo")

# Prepare the type of Progress bar needed.
# Look out for determinate mode and pick the suitable one
# Other formats of display can be suitably explored
processing_bar = ttk.Progressbar(root, orient='horizontal', mode='indeterminate')

# Place the bar at the centre of the window, rely=0.5, anchor=CENTER)

# Start the bar.
# use processing_bar.stop() to stop it


Let me Know What you Think!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s