I had the same issue as Python not working in the command line of git bash, where in Git Bash, when I type Python, it just hangs.
However, typing winpty python works perfectly.
What exactly is winpty? Why is the above command useful?
I had the same issue as Python not working in the command line of git bash, where in Git Bash, when I type Python, it just hangs.
However, typing winpty python works perfectly.
What exactly is winpty? Why is the above command useful?
Quoting the readme:
Winpty is a compatibility layer that allows you to run a Windows console application from a Linux terminal.
winpty.In order to run a Windows GUI application from a Linux terminal, you need to use
winpty.That is why you need it as described here:
rprichard/winptymentions:As detailed in "
mintty/minttyTips":So:
This was asked (specifically for Python) in
msys2/MINGW-packagesissue 2645(With
msys2/MINGW-packagesPR 2675, python3 detects the terminal correctly)See also "Python not working in the command line of git bash", by Gabriel Staples.