0

I was wondering if there was any way that i could read recent text from the terminal in python. I have heard about reading output of command with subprocess.run or subprocess.check_output, however, that requires a command to be run at that specific time. Is there any way i can just read the recent text from the terminal, without running a command to "catch" it?

Hefahl
  • 19
  • 4
  • 2
    Only if your terminal emulator provides a scrollback buffer and a programmatic way to access it. – chepner Dec 14 '22 at 17:20

0 Answers0