DevLog: Download status notification

  • After a bit of work, added a download status notification to
  • The logic is fairly simple –
  • Get the content size of the file by parsing metadata , something like and query for getheaders(“Content-Size”)[0]
  • Returns a dictionary – contaning size of file at [0], Now read the file by temporary blocks of memory
  • say block_size = 1 * 1024 (or if you give 10*1024 its just gona affect your refresh rate or loop cycle rate, no much difference)
  • Now read the contents of file block by block and sum it up in file_size_read, Maybe a buffer = will do
  • For every cycle of read loop,  ( file_size_read / file_size )* 100  will furnish me the percentage of file downloaded at every refresh, It’s that simple.
  • So polished it, disintegrated the code into reusable function modules and pushed it up

This can also be named as “How To Get Screwed In Numerical Methods Modal Exam Tomorrow”



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