app with standalone gui and web interface

johan.h.lindberg at gmail.com johan.h.lindberg at gmail.com
Tue Oct 3 04:21:43 EDT 2006


Hi Daniel.

> What would the simplest way to make an application that has both a web
> interface and runs from behind a web server but also can be used as a
> standalone app with a gui? More precisely is it possible to avoid
> creating an html/xml/whatever based web interface for the web version
> and separately creating a gui (wxpython for example) for the
> standalone version and instead create a graphical frontend at once
> that can be used for both?

I was experimenting with something roughly similar a couple of years
ago. You might find it interesting. What I did may or may not work in
your case. It depends on what you want to be able to do in the
application.

I built an application that consisted of some server side Java/JSPs
that gave out XML. I used two stylesheets to transform the data into
either HTML (for the web version) or another XML-format called wxWML
(for the wxPython version). Desktop users accessed the application via
a custom "webbrowser" that translates the wxWML to wxPython code which
is executed to generate the GUI. This way, anyone with the wxBrowser
installed could access the application as if it was a desktop app.

But you should know that this was an experiment. We ended up not using
it because it felt weird and because there was not much extra gain to
be had from the desktop part. You should also know that the wxBrowser
is a HUGE security hole which is a good reason not to use it.

You can still download the code I wrote and a "tutorial" PDF from
http://www.pulp.se/wx/ but I haven't touched it since last summer so
I'm not sure it works with the latest version of wxPython. Also, I just
noted that the example URL that I point to on that page doesn't work
because I've moved my hosting since then, but that can be fixed.

Good luck
Johan Lindberg
johan at pulp.se




More information about the Python-list mailing list