verigak / progress

Easy to use progress bars for Python
ISC License
1.41k stars 179 forks source link

Make hide & show cursor feature platform independent (add Windows support) #109

Closed james-duvall closed 7 months ago

james-duvall commented 1 year ago

The VT100 control sequences used to hide & show the cursor are not fully supported by Windows.

New method uses the "cursor" package. On Windows platforms, it uses the Windows API. On Posix platforms, it uses the same VT100 sequences.

mfebrizio commented 7 months ago

@verigak could this PR be reviewed and merged? I adapted this code as a patch for my own programs, but it would be ideal to have this distributed in a proper package update.

Also, thank you @james-duvall for this contribution.

verigak commented 7 months ago

progress does not have any dependencies currently and since it is in maintenance mode for many years I don't want to introduce a dependency now.

mfebrizio commented 7 months ago

Thanks for the response. I understand the benefit of no dependencies. Would you consider a PR that did not add new dependencies, given that I believe this issue falls under maintenance/bug fix? I know that a prior commit sought to address the unwanted characters, but Windows users like myself still are having issues.

I've found the package to be great by the way. Being able to use with progress.Bar as a context manager has been really beneficial.

verigak commented 7 months ago

Thanks, I appreciate the interest. Yes I would consider a PR with a more limited scope.