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