Before I start just wants to tell you all that i'm a beginner in python :)
I'm running a python script via git bash while committing code changes(using git hook[commit-message]) and I wants to read some user input from git bash terminal and the same has to be sent to my python script where i'll validate that, I tried many options that are available in python modules like getpass, subprocess, msvcrt and others but nothing worked for me. So could someone guide me or show me the code how to achieve this?
Below is the one of the sample code I have used,
import sys
sys.stderr.write("Enter> ")
s=input("")
print(s)
and the output is below, actually the terminal control(stdin) doesn't wait to get user input instead it simply ended.
Referred below links but nothing worked out for me :( bash script which executes a python script which prompts user GIT hook -> Python -> Bash: How to read user input?