I'm trying to find a way to paste in my OS in Python (not only the terminal).
This is my code to test but it only pastes in stdout.
import pyperclip
from time import sleep
pyperclip.copy('this is the text\nok\n')
n = 0
while n < 10:
n += 1
sleep(1)
pyperclip.paste()
I know it should only paste in terminal, but I did not find any way to let Python paste in another application.
In my test (not real env), I use Notepadd and VSCode, and I see I can manually ctrl+v
and clipboard works fine, but it does not automatically paste.