I used to store strings in files and then put the file content into clipboard by shell redirection, today I have found a better way:
teststring = "I am now in clipboard 3 !" p = Popen(["pbcopy"], stdin=PIPE) # p.communicate(input=teststring.encode(encoding='utf_8', errors='strict')) p.communicate(input=teststring.encode())
0 comments:
Post a Comment