Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML/Javascript/CSS GUI for the development of desktop applications with python?

I wonder if there's a python GUI like pyqt etc. which works purely with html and javascript for layouting desktop applications...

Do you know if there are projects like this? Does this make sense at all ;-) Or it it just me finding that a nice tool...

like image 701
Jurudocs Avatar asked Nov 01 '11 13:11

Jurudocs


2 Answers

If it were Python-based but had nothing to do with Python, would you really care if it wasn't Python based?

Anyways, yes, a project exists. A pretty big one too. It's called XULRunner. The project is maintained by Mozilla and is used for the GUI of every Mozilla program.

It features an XML-based syntax (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>

And JavaScript:

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

You can even embed Python scripts, it seems, into your code: http://pyxpcomext.mozdev.org/no_wrap/tutorials/pyxulrunner/python_xulrunner_about.html

like image 132
Blender Avatar answered Sep 18 '22 22:09

Blender


Since you mention PyQt yourself, you could perhaps just create a simple GUI using these tools, with your entire application made up of a QtWebKit module. Then just point to some files you created locally, and browse them using your appliction? But, this would not be any different compared to using a normal browser, so there's not really any point in doing this in my opinion...

like image 38
jro Avatar answered Sep 18 '22 22:09

jro