-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to shutil for getting terminal size
Due to possible permissions issues with automated testing switching to shutil to indirectly call os.get_terminal_size() is best.
- Loading branch information
1 parent
7dd655c
commit 243e537
Showing
2 changed files
with
3 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import os | ||
import shutil | ||
|
||
|
||
def print_clean(msg): | ||
terminal_size = os.get_terminal_size() | ||
terminal_size = shutil.get_terminal_size() | ||
msg_length = len(msg) | ||
print("{}{}".format(msg, " " * (int(terminal_size[0]) - msg_length)), end='') |
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
243e537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Evolution0!