V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
alittletrain
V2EX  ›  Python

python tkinter 如何实现点击打开一个链接?

  •  
  •   alittletrain · Jul 21, 2016 · 8615 views
    This topic created in 3573 days ago, the information mentioned may be changed or developed.

    python tkinter 如何实现点击打开一个链接? text 或者按钮 都可以

    8 replies    2016-07-21 15:34:26 +08:00
    alittletrain
        2
    alittletrain  
    OP
       Jul 21, 2016
    @whoareyou 谢谢 官网手册我找到了 但是我没找到啊
    yangtukun1412
        3
    yangtukun1412  
       Jul 21, 2016
    import antigravity

    你是要这种效果吗
    mdzz
        4
    mdzz  
       Jul 21, 2016
    import webbrowser

    然后配合 Tkinter 里面的 bind()
    whoareyou
        5
    whoareyou  
       Jul 21, 2016
    不确定你说的是点击 button 或 text 之后通过浏览器打开链接还是直接将链接对应的网页爬下来显示到当前窗口。 http://bbs.fishc.com/thread-59444-1-1.html
    alittletrain
        6
    alittletrain  
    OP
       Jul 21, 2016
    @whoareyou 点击 button 或 text 之后通过浏览器打开链接 c
    alittletrain
        7
    alittletrain  
    OP
       Jul 21, 2016
    @yangtukun1412 点击 button 或 text 之后通过浏览器打开一个链接
    alittletrain
        8
    alittletrain  
    OP
       Jul 21, 2016
    @mdzz 我只实现了打开固定的某个链接 但是如何用打开任意链接?传入参数之后 好像是先执行了 webbrowser.open
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   882 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 90ms · UTC 19:00 · PVG 03:00 · LAX 12:00 · JFK 15:00
    ♥ Do have faith in what you're doing.