推荐学习书目
› 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
alexinit
V2EX  ›  Python

小白求救,html 中 Button 点击后想调用 python 脚本中的函数,怎么实现啊.

  •  
  •   alexinit · Nov 5, 2015 · 9882 views
    This topic created in 4036 days ago, the information mentioned may be changed or developed.
    如题.
    7 replies  •  2016-05-30 18:16:43 +08:00
    Ncer
    Ncer
    Nov 5, 2015
    1
    QT 里有 addToJavaScriptWindowObject
    vileer
    vileer
    Nov 5, 2015❤️1
    2
    给两条思路吧:
    1.webview 接口,就像 1 楼那样
    2.实现一个 tiny web server , python 本来就有个 SimpleHTTPServer 的模块,实现起来不是什么难事
    wkdhf233
    wkdhf233
    Nov 5, 2015
    3
    http://www.brython.info/
    你在说这个么
    alexinit
    alexinit
    OP
    Nov 5, 2015
    4
    huson
    huson
    Nov 5, 2015
    5
    用 web.py 或者其他 flask 等微框架 直接把函数写里面 用 url 调用就行了啊。。
    alexinit
    alexinit
    OP
    May 30, 2016❤️1
    6
    @huson 解决了,直接用 flask 写成借口调用就可以啦.之前太小白.
    alexinit
    alexinit
    OP
    May 30, 2016
    7
    接口-->接口,打错字了.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2210 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 14:09 · PVG 22:09 · LAX 06:09 · JFK 09:09
    ♥ Do have faith in what you're doing.