Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new API for Windows: colorama.just_fix_windows_console()
tqdm uses colorama to enable proper ANSI support on Windows. Traditionally, it's done this by calling `colorama.init`. But this API is pretty awkward: it tries to do too much (e.g. guessing whether you have ANSI support and if not then installing sys.stdout/stderr filters that remove all ANSI codes from output -- even if the system actually does support ANSI!), and it isn't idempotent, so if multiple libraries all call `colorama.init` then you can get brokenness (in particular, it can trigger the situation where colorama thinks ANSI is unavailable, when it actually is!). To solve this, colorama 0.4.6 added a new API, `colorama.just_fix_windows_console`: tartley/colorama#352 The advantage of this is that it does what it says: it just fixes the Windows console, without any strange side-effects, and it's safe to call multiple times.
- Loading branch information