I am running some bash commands via python os.system('/vt -start ./home/mydb ./home/images/image-001-053.png 2>&1 | tee ./ results.txt >/dev/pts/2').
This is a command which can be run on terminal with tty=/dev/pts/2.
After running the command , the output of bash terminal is saved in a file (results.txt) and later I should read the file. The problem is that after running the command, I need to press keyboard Enter key manually to run the next command in the same terminal with tty number 2, python is not forcing '\n' to return to command line again.
Do you have any suggestion? How can I add a command which simulates keyboard Enter key on the terminal?