V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
woshichuanqilz
V2EX  ›  Python

Python 如何获取剪贴板中的文件名?

  •  
  •   woshichuanqilz · 2017-12-20 13:53:41 +08:00 · 3103 次点击
    这是一个创建于 2291 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我复制了一个文件, 我想获取这个文件的名字和绝对路径,这个东西怎么操作?

    我参考了这个链接, 但是好像没有我需要的。

    http://pyqt.sourceforge.net/Docs/PyQt4/qclipboard.html#image

    8 条回复    2017-12-21 16:49:13 +08:00
    ysc3839
        1
    ysc3839  
       2017-12-20 17:10:12 +08:00
    不调用第三方库的情况下,得根据不同的系统来调用系统 API 获取。
    不过应该有现成的第三方库,搜索看看吧。
    param
        2
    param  
       2017-12-20 19:03:40 +08:00 via Android
    Linux 还是什么?
    wecBolt
        3
    wecBolt  
       2017-12-20 20:10:12 +08:00
    这个楼主解决了吗
    will0404
        4
    will0404  
       2017-12-20 21:01:14 +08:00 via iPhone
    mac 的话可以用 pbpaste 命令
    ligyxy
        5
    ligyxy  
       2017-12-21 00:01:53 +08:00 via Android   ❤️ 1
    focusheart
        6
    focusheart  
       2017-12-21 10:26:43 +08:00
    @ligyxy 十分感谢~正好我也需要这样的功能呢~
    vforbox
        7
    vforbox  
       2017-12-21 12:10:54 +08:00
    @ligyxy
    ysc3839
        8
    ysc3839  
       2017-12-21 16:49:13 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3224 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:51 · PVG 18:51 · LAX 03:51 · JFK 06:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.