-
Notifications
You must be signed in to change notification settings - Fork 34
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
Broken on Windows: Need to use shutil.get_terminal_size() #13
Comments
How could that be? This is a standard module in both Python 2 and 3. |
My guess, but I am no expert, is that since it's Unix specific it only gets installed on Unix environments? My Python 3.5 installation on Windows 7 does not contain a fcntl library, only some tests in the lib\test directory called test_fcntl_cpython..... |
Ohhh. Then this is something we definitely need to fix. It seems the way to do this, is to update the dimensions method in util.py to use this library: https://pypi.python.org/pypi/backports.shutil_get_terminal_size as I learned from http://stackoverflow.com/a/14422538 Would you like to contribute this as a pull request, since you actually use windows? |
I'm a pretty green python dev - I'd be in over my head most likely (please forgive lol). I'd gladly test it though. |
If I get bored one of these weekends, I'll consider writing it. But I'm hesitant to do so, because I have no Windows computer to test further. For all I know, other functionality might be broken too. Hopefully another volunteer will come along to implement the Windows support. |
I can test it, since I have a Windows computer (Windows 10 to be precise). |
Also changed default console size to (80, 24); Fixes jart#13
@jart: check out my implementation! It replies on It also changes the default terminal size to (80,24), which seems to be a much more common default. Tested and works on Windows! |
Thanks for working on this! |
Trying to the the simple examples working but the
from fabulous.color import bold
statement fails with
>>> from fabulous.color import bold Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\Python35\lib\site-packages\fabulous\color.py", line 31, in <module> from fabulous import utils, xterm256, grapefruit File "D:\Python35\lib\site-packages\fabulous\utils.py", line 25, in <module> import fcntl ImportError: No module named 'fcntl'
The text was updated successfully, but these errors were encountered: