my code calls a program and copies output to a variable
info = os.popen('info filename').read()
which outputs a multi line sting
line
line1 : ABC
line2 : (efg)
line3 : ABCDEFG! (hijkl)
......................................
lets say i want to delete (efg)
from that variable
so
info = info.replace('(egf)' , '')
now i want to copy the variable to clipboard. So i can paste it using selenium since that info string is very large and selenium in chrome types one key at a time it just scrambles all letters in info
variable while typing
so if i can copy this variable to clipboard i should just be able to do
textarea.sendkeys(Keys.CONTROL , 'v')
i've heard about pyperclip
but i cant use that