gpt4 book ai didi

python - 用于使用 python 开发桌面应用程序的 HTML/Javascript/CSS GUI?

转载 作者:太空狗 更新时间:2023-10-29 15:31:06 27 4
gpt4 key购买 nike

我想知道是否有像 pyqt 等的 python GUI,它纯粹使用 html 和 javascript 来布局桌面应用程序......

你知道有没有这样的元素?这有意义吗 ;-) 或者只是我发现了一个不错的工具...

最佳答案

如果它是基于 Python 的但与 Python 无关,你真的会关心它是否基于 Python 吗?

无论如何,是的,一个元素存在。一个也很大。它叫做XULRunner .该元素由 Mozilla 维护,用于每个 Mozilla 程序的 GUI。

它具有基于 XML 的语法 (XUL):

<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="main" title="My App" width="300" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/javascript" src="chrome://myapp/content/main.js"/>

<caption label="Hello World"/>
<separator/>
<button label="More >>" oncommand="showMore();"/>
<separator/>
<description id="more-text" hidden="true">This is a simple XULRunner application. XUL is simple to use and quite powerful and can even be used on mobile devices.</description>

</window>

和 JavaScript:

function showMore() {
document.getElementById("more-text").hidden = false;
}

您甚至可以将 Python 脚本嵌入到您的代码中:http://pyxpcomext.mozdev.org/no_wrap/tutorials/pyxulrunner/python_xulrunner_about.html

关于python - 用于使用 python 开发桌面应用程序的 HTML/Javascript/CSS GUI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7967575/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com