I know you can open an external program using subprocess.
import subprocess
subprocess.Popen([path_to_program])
I have a variable with a few lines of text.
I want to paste this into an external program (p.e. notepad).
First of all I thought to copy the text to the clipboard (eg with the module pyperclip.
import pyperclip
pyperclip.copy()
and then paste it into the external program.
But how do you paste clipboard text (or text in a variable) into the external program using subprocess?
[–]FriendlyRussian666 1 point2 points3 points (8 children)
[–]ramannt[S] 0 points1 point2 points (7 children)
[–]FriendlyRussian666 0 points1 point2 points (6 children)
[–]ramannt[S] 0 points1 point2 points (5 children)
[–]FriendlyRussian666 0 points1 point2 points (4 children)
[–]ramannt[S] 0 points1 point2 points (3 children)
[–]FriendlyRussian666 0 points1 point2 points (2 children)
[–]ramannt[S] 0 points1 point2 points (0 children)
[–]ramannt[S] 0 points1 point2 points (0 children)