try:
subprocess.run(exe_path)
keyboard.press_and_release('enter')
print('Successful Extracted')
except Exception as exe:
print(exe.args)
keyboard.press_and_release('enter')
The point is to run the EXE of windows but it needs an input of keyboard to end its process, and it will remain stuck over there unless a keyboard input is given physically. Right now I am facing an issue as
subprocess.run('some_exe')
is running the process and after successfully run asking
Press Any Key To Exit
while I have already mentioned next to subprocess.run
keyboard.press_and_release('enter')
and it's coming to the next line unless we press the button from the keyboard manually
NOTE: python3.8