Skip to content

Almost working on Windows :) #261

Open
@bagage

Description

@bagage

Hi,

I saw in #101 that you don't intend to support Windows, nonetheless I tried to use it at work and it almost works! If you're OK with it, I can list issues and maybe submit a PR for that:

  • you need to install windows-curses
  • curses.init_pair(0, curses.COLOR_BLACK, bg) raises an exception on windows. Not sure what this code is for, but for now I commented that code. A warning Enhanced colors failed to load appears everytime I quit. curses.init_pair(0) raises ERR zephyrproject-rtos/windows-curses#10
  • this code expects os.environ["TERM"] to always be present but that's not the case on Windows. Maybe we could use os.environ.get("TERM", "") instead?
  • backspace key is toggling help instead of removing last character. edit: It seems that keycodes are retrieving from windows-curses but it never returns keycode, backspace has ord()=8 similarly to ctrl+h hence the help toggle. chr() returns same value for ctrl+h and backspace zephyrproject-rtos/windows-curses#9
  • probably related, but typing [enter] inserts a new space instead of a new line (it behaves like [space]). --> actually no, key_mappings.py must be updated to support ^M to behave like \n.
  • I have not looked for an equivalent of xclip/xsel/pbcopy for windows yet, hence a warning everytime I quit suplemon. edit: clipboard package could do the trick
  • It fails to load Crypto module. You have to install pip install pycrypto but it requires VisualStudio build tools that I cannot install since I am not admin on my machine. I'll test on another machine for this. I actually managed to make suplemon happy: pip uninstall crypto ; pip install pycryptodome.

If interested, I'll continue my investigation to see what's working and what's not in the upcoming days.

Thanks!

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