-
Notifications
You must be signed in to change notification settings - Fork 44
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
simple-term-menu not work on Windows #5
Comments
Thanks for trying simple-term-menu. Currently, only Linux and macos are supported. Windows needs completely different terminal handling code. That is also the reason why |
Is using Cygwin maybe an option for you? |
Possible. simple-term-menu started in msys32, also this must work in wsl |
The next release will at least throw a more descriptive exception for non-supported platforms. |
Just to mention it works fine on wsl as @jDan735 indicated. Check this out (WSL2 Ubuntu LTS 18.04.5) |
Will this be fixed soon? Are there alternatives to this ? |
Windows terminals need completely different terminal handling code so quite a lot of work has to be done first. I think it would be best to split simple-term-menu in a platform dependent and a platform independent part so the right terminal backend code can be loaded if on Unix or Windows. However:
@tmkkcc Maybe bullet could be the right choice for you. There is a open PR for adding Windows support. |
I use it within Microsoft Terminal (the one from the app store), under wsl2
and it runs wonderfully.
I wouldn't be so sure under legacy terminal, but I might be able to help
you test, develop.
…On Tue, Jun 22, 2021, 08:59 Ingo Meyer ***@***.***> wrote:
Windows terminals need completely different terminal handling code so
quite a lot of work has to be done first. I think it would be best to split
simple-term-menu in a platform dependent and a platform independent part so
the right terminal backend code can be loaded if on Unix or Windows.
However:
- I don't know if a Windows terminal supports all features
simple-term-menu uses in Unix environments.
- I definitely need help here because I am not very familiar with
Windows programming.
@tmkkcc <https://github.com/tmkkcc> Maybe bullet could be the right
choice for you. There is a open PR for adding Windows support
<bchao1/bullet#79>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEHBTYNB75KKM5YPQNJ6LLTUB3JNANCNFSM4N3T7M3Q>
.
|
I have played around a bit in the last two days and got at least the basic basic functions in 'Windows Terminal' to work: At first sight it looks like entry selection, colors, preview and search (just couldn't get I have close to no knowledge about Windows Terminal and CMD handling, but I figured following key points might be quiet challenging to implement:
and most likely some other things and edge cases, which I have not considered yet. Without external dependencies, the amount of code is likely to grow a lot. I have also used some shortcuts which could benefit from a proper implementation (e.g. use of sys.stdin/out, instat of a proper stream handle). But perhaps I have overlooked some simpler solutions. |
@wnhrt This is great news! 👍 I really thought that handling a windows terminal would be much trickier. Could you share your code changes? I am very curious. 😊 |
Sure thing 😃 I was able to get backspace to work (used the wrong key code) and enable VT100 mode in CMD.exe. Variable length unicode symbols and resize of the window still cause problems and I didn't test key combinations, like Alt+X or Ctrl+X. I reused most of your code. Design wise it might be sensible to create Windows-specific functions, e.g. for _query_terminfo_database. Also _tty_in/out and similar unix specific naming could be confusing for future contributors. |
If it is possible to display Unicode characters, the Unicode box characters should also work. Didn't know that the legacy terminal supports Unicode characters. |
I guess it does not. It uses Windows-1252. But you are right, it luckily supports box characters :) I made a pull request, which also includes a fix to use them. |
The wcwidth module could become an optional dependency for Windows (for example, by installing it with |
not sure if this helps. but i just installed the lynux terminal and it all works fine. couldnt run anything before. just ran "wsl --install" in my terminal. i think as admin. and then restarted pc. |
- Show a nice error message if the user is using a non-supported AWS region. #104 (bugfix) Bugfix related to IngoMeyer441/simple-term-menu#5
is there any thing like simple-term-menu work on windows? |
since there is not any progress about supporting windows, i made this if any one need ! dumb_menu |
python-inquirer is also a good choice(supports cross-platform and single/multiple selection, etc). Hope it will save your life. I use it in my project - pkgu. |
System
Steps to reproduce
pip install simple-term-menu
Output
The text was updated successfully, but these errors were encountered: