Jurudocs
Jurudocs

Reputation: 9165

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...

Upvotes: 5

Views: 3133

Answers (3)

Optimus
Optimus

Reputation: 2776

you could always use django, django templates support html, js, css, php etc.

Upvotes: 0

jro
jro

Reputation: 9474

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...

Upvotes: 2

Blender
Blender

Reputation: 298046

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

Upvotes: 10

Related Questions