Skip to content
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

Windows: "stty size" -> "stty is not recognized as an internal or external command" #1048

Closed
mdmintz opened this issue Nov 3, 2021 · 1 comment
Assignees
Labels
bug Uh oh... Something needs to be fixed

Comments

@mdmintz
Copy link
Member

mdmintz commented Nov 3, 2021

Windows: stty size -> stty is not recognized as an internal or external command.

Looks like the stty size command, (which works great on Linux and Mac), does not exist in Windows command prompts, and therefore SeleniumBase will print a warning whenever someone uses the sbase print [FILE] command on Windows.

This is an easy fix. Just replace the first line with the second line here:

console_width = os.popen("stty size", "r").read().split()[1]

console_width = os.get_terminal_size()[0]

(The next line converts a text result to an integer.)

Some commands, (such as sbase mkrec [FILE.py]), use the sbase print [FILE] command to print out results.

@mdmintz mdmintz self-assigned this Nov 3, 2021
@mdmintz mdmintz added the bug Uh oh... Something needs to be fixed label Nov 3, 2021
@mdmintz
Copy link
Member Author

mdmintz commented Nov 4, 2021

@mdmintz mdmintz closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh oh... Something needs to be fixed
Projects
None yet
Development

No branches or pull requests

1 participant