import pyperclip
dd=pyperclip.paste()
print(dd)
pyperclip.copy("docs.python.org")
print(pyperclip.paste())
pyperclip.copy("hello")
print(pyperclip.paste())
输出
hello
docs.python.org
hello
来源:oschina
链接:https://my.oschina.net/u/4343285/blog/4527123