⚠️ Some subtle changes to behavior in this version, with regards to getting the size of the terminal and highlighting strings renderables. Please review the release notes carefully.
[9.5.0] - 2020-12-18
Changed
- If file is not specified on Console then the Console.file will return the current sys.stdout. Prior to 9.5.0 sys.stdout was cached on the Console, which could break code that wrapped sys.stdout after the Console was constructed.
- Changed
Color.__str__
to not include ansi codes - Changed Console.size to get the terminal dimensions via sys.stdin. This means that if you set file to be an io.StringIO file (for example) then the width will be set to the current terminal dimensions and not a default of 80.
Added
- Added stderr parameter to Console
- Added rich.reconfigure
- Added
Color.__rich__
- Added Console.soft_wrap
- Added Console.style parameter
- Added Table.highlight parameter to enable highlighting of cells
- Added Panel.highlight parameter to enable highlighting of panel title
- Added highlight to ConsoleOptions