#57 Progress Bar
A progress bar is a visual element that shows how much of a task has been completed. Progress bars are often used alongside downloading files or software installations. This project creates a getProgressBar()
function that returns a progress bar string based on the arguments passed to it. It simulates a downloading file, but you can reuse the progress bar code in your own projects.
The Program in Action
When you run progressbar.py, the output will look like this:
Progress Bar Simulation, by Al Sweigart
[█████████ ] 24.6% 1007/4098
How It Works
The progress bar relies on a certain trick that programs running in terminal windows ...
Get The Big Book of Small Python Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.