We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is a small patch that I applied to allow Progress to work with Python 2.6. There were two incompatibilities:.
--- plumbum/cli/progress.py 2015-10-19 09:56:17.000000000 -0600 +++ plumbum_py2.6/plumbum/cli/progress.py 2015-10-19 09:51:11.000000000 -0600 @@ -8,6 +8,7 @@ import datetime from plumbum.lib import six from plumbum.cli.termsize import get_terminal_size +import sys class ProgressBase(six.ABC): """Base class for progress bars. Customize for types of progress bars. @@ -81,7 +82,7 @@ if self.value < 1: return None, None elapsed_time = datetime.datetime.now() - self._start_time - time_each = elapsed_time / self.value + time_each = elapsed_time.seconds / self.value time_remaining = time_each * (self.length - self.value) return elapsed_time, time_remaining @@ -151,7 +152,8 @@ print(disptxt) else: print("\r", end='') - print(disptxt, end='', flush=True) + print(disptxt, end='') + sys.stdout.flush() class ProgressIPy(ProgressBase):
The text was updated successfully, but these errors were encountered:
Feel free to submit a pull request next time, that way you'll get the credit a little more directly. I'll go ahead and apply the patch.
Sorry, something went wrong.
Fixed. Thanks! Changed the .seconds to use .days and .microseconds too, since those are not included.
.seconds
.days
.microseconds
Sorry, I tried to credit you in the commit, but my Mac decided to auto correct to unix.
Its fine thanks.
I'm not working on my home system or I'd have just submitted a merge request anyway.
No branches or pull requests
Here is a small patch that I applied to allow Progress to work with Python 2.6. There were two incompatibilities:.
The text was updated successfully, but these errors were encountered: