python 打开关闭或使用,剪切板CLipBoard

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/daska110/article/details/80323471

https://herechen.github.io/technology/copy-a-string-to-the-clipboard-on-windows/

#encoding=utf-8
import os
# def addToClipBoard(text):
#     command = 'echo ' + text.strip() + '| clip'
#     os.system(command)
# a = r'f:\123456.jpg'
# addToClipBoard(str(a))


from tkinter import Tk
tk = Tk()
filePath = tk.clipboard_get()
print(filePath)
阅读更多
换一批

没有更多推荐了,返回首页