(stream, chunk, bytes_remaining)
| 3 | import platform |
| 4 | |
| 5 | def on_progress(stream, chunk, bytes_remaining): |
| 6 | total_size = stream.filesize |
| 7 | bytes_downloaded = total_size - bytes_remaining |
| 8 | percentage = (bytes_downloaded / total_size) * 100 |
| 9 | print(f"Downloading : {percentage:.2f}%", end='\r') |
| 10 | |
| 11 | # Clear the terminal based on the OS |
| 12 | if platform.system() == 'Windows': |
nothing calls this directly
no outgoing calls
no test coverage detected