Closed bruceiv closed 4 years ago
Hi @bruceiv, Thanks for the PR. This looks a nice improvement to the script. However I am little anxious about introduction of new parameter as we don't know how other developers are using this scripts. I believe using the event handler approach of JavaScript will be less error-prone and provide user with good level of customization.
Thank you for your valuable input @nareddyt
@bruceiv Can you also document these lambdas in the README.md and moss_usage.py for easy reference for other developers.
I pushed the suggested documentation, using the basic "print a string of *'s" logging function. I decided not to change the default behaviour so as to not break backward compatibility with the existing script.
I wanted to be able to put in a progress bar for uploads and downloads, so I added a lambda for a user-definable effect on uploads and downloads to Moss. The default value is
None
, so it should be backward-compatible, butprint('*', end='', flush=True)
is an example of a really simple progress tracking effect, or you can do something nicer-looking with a more-sophisticated progress bar library.