I am trying to write a file manager using Python and Curses. A feature I want to have is by pressing enter over an executable, said executable will be run within the terminal. What is happening is that the program runs, but input does not work and newlines aren't returning to the left side of the screen. I think this is because Curses is still trying to format the output of the run program and blocking input. How can I temporarily stop curses from making these changes to the terminal?
I have tried putting
curses.nocbreak()
stdscr.keypad(False)
curses.echo()
before calling os.system
, to no avail. I also tried the same code with subprocess.call
to the same result