Skip to content

[Feature Requests] Windows support #3

Description

@I-love-study

Hi! It's nice to see a library to show sixel image on terminal. But It seems that it cannot running on Windows.
It seems that because of using termios and select in cellsize.py, which is only supported on Unix. And cellsize are imported in __init__.py. So in windows, it cannot be imported.

Consider that preview version of Windows Terminal have already support sixel few months ago(In Windows Terminal Preview v1.22.2362.0). The stable version of windows terminal will also support it in future. I think it's nice to support it on Windows.

I think the fastest way to make it working on windows is to move from .cellsize import get_size from the head of __init__.py into try block in here. So that char_size can as default in (10, 20)

try:
char_width, char_height = get_size()
except Exception:
char_width, char_height = (10, 20)

By the way, I try to write Windows Implementation for get_size method.
For the size in char, we can use shutil.get_terminal_size to get in both Windows and Unix. But I have no idea how to get the size in pixels on windows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions