Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Python 3.6 中使用 pyperclip
如果我有一个巨大的二维数组(640X480),我如何将它复制到一个程序中并使用 pyperclip copy() 和 paste() 函数将其粘贴到另一个程序中。
在第一个程序中使用以下代码:
pyperclip.copy(array)
在第二个程序中使用这个:
array=eval(pyperclip.paste())
您可以将数组转换为 JSON 字符串或 pickle,复制字符串,然后将其粘贴到其他程序中。另一个程序需要能够解码 JSON 字符串或 pickle。