推荐学习书目
› 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 · Dec 20, 2017 · 4177 views
    This topic created in 3211 days ago, the information mentioned may be changed or developed.

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

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

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

    8 replies  •  2017-12-21 16:49:13 +08:00
    ysc3839
        1
    ysc3839  
       Dec 20, 2017
    不调用第三方库的情况下,得根据不同的系统来调用系统 API 获取。
    不过应该有现成的第三方库,搜索看看吧。
    param
        2
    param  
       Dec 20, 2017 via Android
    Linux 还是什么?
    wecBolt
        3
    wecBolt  
       Dec 20, 2017
    这个楼主解决了吗
    will0404
        4
    will0404  
       Dec 20, 2017 via iPhone
    mac 的话可以用 pbpaste 命令
    ligyxy
        5
    ligyxy  
       Dec 21, 2017 via Android   ❤️ 1
    focusheart
        6
    focusheart  
       Dec 21, 2017
    @ligyxy 十分感谢~正好我也需要这样的功能呢~
    vforbox
        7
    vforbox  
       Dec 21, 2017
    @ligyxy 赞
    ysc3839
        8
    ysc3839  
       Dec 21, 2017
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1009 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 17:21 · PVG 01:21 · LAX 10:21 · JFK 13:21
    ♥ Do have faith in what you're doing.