PYTHON 3 INSTALL CURSES HOW TO
ConclusionĪfter reading this, you should know how to get curses applications running in Windows. From your command prompt or shell, run pip install or preferably python -m pip install like this: python -m pip install windows-curses Test out cursesĪfter installing the windows-curses package using pip, you can test it out with code: # Clear the screen and hold it for 3 secondsįor a tutorial on how to use curses, check out Curses Programming in Python. That's really all there is to it! This package will make it so you can use the Python standard curses module in Windows. You can use pip to install the windows-curses package. It is not full curses support but some colors and cursor control abilities work. Read more at MSDN Console Virtual Terminal Sequences.
In Windows 10, some color escape codes are supported without any special configuration. You might also be interested in the tutorial Colorize Terminal Output in Python. That will teach you how to actually use the library. Refer to the official documentation, Curses Programming with Python. This is not a full tutorial on curses programming. Read more about the history on the Wikipedia curses page. The curses library goes back decades and is used to control terminal/shell output. This gets the screen control, keyboard input, and colors all working. This was tested in Windows 10 with Python 3.6. This show you how to get curses working in Windows. The big problem is that it doesn't work out-of-the-box on Windows.
The curses package is part of the Python standard library and is useful for creating text-based user interfaces and generally controlling the screen and keyboard input. For a tutorial on how to use curses, check out Curses Programming in Python.
A full curses tutorial is also available. This post only discusses how to get curses working in Windows.