stty is not recognized on windows 10
andrejohansson opened this issue · comments
Describe the bug
Running gomp on windows 10 (new Windows terminal from app store) fails with the message below. Seems to have something to do with getting the terminal size.
❯ gomp master feature/update-smoke-tests
'stty' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "c:\program files (x86)\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files (x86)\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python38-32\Scripts\gomp.exe\__main__.py", line 4, in <module>
File "c:\program files (x86)\python38-32\lib\site-packages\gomp\gomp.py", line 87, in <module>
line_length = int(os.popen('stty size', 'r').read().split()[1])
IndexError: list index out of range
Version and Platform
Windows 10 build 2004
Windows Terminal 1.1.2021.0
Python 3.8.1
https://docs.python.org/3/library/shutil.html#querying-the-size-of-the-output-terminal should do it I think!
@Suleman-Elahi if you're running gomp from the pip installed version, it will probably not have these changes yet. You could try out the implementation from the repo to see if it resolves your problem though.
I'll keep this issue open until we release a new version accessible from pip install.
Version 1.1 (for Python 3), available here and on pip, should solve this issue, thanks for reporting!
Configmed, solves things for me. Thank you!