Skip to content

fix find_in_po. Make it Windows compatible #2714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use os.get_terminal_size() instead of stty size for width
  • Loading branch information
cacrespo committed Oct 26, 2023
commit b710af278d1d7e3dbe38907d613bc1f54d984b7e
4 changes: 2 additions & 2 deletions scripts/find_in_po.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def _get_file_entries(pattern, width, filename):
def find_in_po(pattern):
pattern = regex.compile(pattern)
try:
_, columns = os.popen("stty size", "r").read().split()
available_width = int(columns) // 2 - 3
columns, _ = list(os.get_terminal_size())
available_width = columns // 2 - 3
except:
available_width = 80 // 2 - 3

Expand Down