Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Levis Vazquez
Levis Vazquez
961 Points

How do I add a progress bar to my script (Python 3.5)

Hi, I have a script that downloads a . zip file from the internet, the file takes sometime to download so I would like to have a progress bar while it's downloading and when it finish unzip the file to a folder in 'C:\, then deletes the .zip. Here is my script so far, any help will be greatly appreciate.

import urllib.request while True: print("Downloading File") break url = urllib.request.urlretrieve('www.google.com/filename.zip', 'C:/users/home/filename.zip')

1 Answer

Tony Gu
Tony Gu
8,789 Points

Here are a couple of options that I know:

  1. progress - Easy to use progress bars for Python https://github.com/verigak/progress/

  2. clint - Command Line INterface Tools - by the author of Requests https://github.com/kennethreitz