[Tkinter-discuss] Help needed

Balasubramani K bala.pursuit at gmail.com
Mon Jul 29 05:56:30 EDT 2019

Hi ,
I'm using following modules in python 3:
import requests
import os
from tqdm import tqdm

a piece of code from my script,

requests.get(url, stream=True,allow_redirects=True)
total_size = int(r.headers['content-length'])
with open(SaveLocation + SaveFilename, 'wb') as f:
for data in tqdm(iterable=r.iter_content(chunk_size=Chunk_size),
total=total_size / Chunk_size, unit='KB', desc=SaveFilename):

when I run the python file in terminal I get output as below :

47%|████▋     | 76442/161258.81970214844 [14:12<16:26, 86.00KB/s]

this progress bar I got it from a module called tqdm

Now I'm planning to make UI,  using tkinter with start stop button.
but when I click start button I need the same tqdm progress bar output in
the tkinter window

could you please help me how to do it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20190729/ad7c9152/attachment.html>

More information about the Tkinter-discuss mailing list