-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for table stdout detection in some cases.
When a table is created prior to sys.stdout being changed to some other file object, as can be the case when a pager is used, the table would incorrectly assume it was not drawing to a tty when it came time to print output and would not use the proper terminal size, despite using the correct renderer class. This patch changes the Table.file attr to be a lazy property that checks the user override value and otherwise returns the current value of sys.stdout.
- Loading branch information
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters