simple-term-menu: simple-term-menu not work on Windows

System

Parameter Info
OS Win7 SP1 x86
Python Python 3.8.3
Pip Pip 20.1.1

Steps to reproduce

  1. pip install simple-term-menu
  2. run this code:
from simple_term_menu import TerminalMenu

terminal_menu = TerminalMenu(["entry 1", "entry 2", "entry 3"])
terminal_menu.show()

Output

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "H:\github\simple-term-menu\simple_term_menu.py", line 7, in <module>
    import termios
ModuleNotFoundError: No module named 'termios'

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

since there is not any progress about supporting windows, i made this if any one need ! dumb_menu

I have played around a bit in the last two days and got at least the basic basic functions in ‘Windows Terminal’ to work: image image

At first sight it looks like entry selection, colors, preview and search (just couldn’t get <backspace> to work as expected) could work fine without too many changes.

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.

Just to mention it works fine on wsl as @jDan735 indicated. Check this out (WSL2 Ubuntu LTS 18.04.5)

image

The next release will at least throw a more descriptive exception for non-supported platforms.

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.