def copy():
"""
Returns the current text on clipboard.
"""
data = pyperclip.paste()
## before using pyperclip
# if os.name == "posix":
# p = subprocess.Popen(["xsel", "-bo"], stdout=subprocess.PIPE)
# data = p.communicate()[0].decode("utf-8")
# elif os.name == "nt":
# data = None
# else:
# print("We don't yet support %s Operating System." % os.name)
# exit()
return data
评论列表
文章目录