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 pbpaste,但它说python: can't open file 'pbpaste': [Errno 2] No such file or directory 代码必须包含在文件中运行?
python pbpaste
由于pbpaste在标准输出上产生输出,而 Python 可以从标准输入中获取输入,因此您可以简单地通过管道传输它们:
pbpaste
pbpaste | python