richardasaurus/mega.py — pull request #28 by gissehel (2013-04-28 06:57:29+00:00)
Title: Added on_progression_updated callback on download and upload.

This pull request should close Issue #27. By using a callback, any front-end may update what need to be updated (like a progressbar, a transfert rate, or anything like that).

Implemented in download and upload.
Also, changed the ``file_info.st_size`` because the pertinence of this information on a non closed file is OS dependent. I don't how non-linux unixes behave in this scenario, but I'm pretty sure different Windows versions behave differently here.

I also kept the verbose code because there is no need to remove it (I ported it in the upload code as well).