Using a browser as a GUI: which Python package

John Bokma john at castleamber.com
Fri Apr 28 20:16:43 EDT 2006


"André" <andre.roberge at gmail.com> wrote:

> First, an apology: I realise that I don't know enough about what I am
> asking to make sure to use the proper language to phrase my question.
> 
> I would like to use a browser (e.g. Firefox) as a simple GUI
> "framework".  Note that this is to be done on a single user machine, so
> the question of sandboxing is not really relevant here.
> 
> The simplest application I would like to start with would be one with
> two "windows" (within a browser window) and a single button.  One
> window would be used as a Python code editor; the other as an output
> window.  On clicking on the button, the code in the editor window would
> be run by Python with the result appearing in the output window.
> 
> [A more advanced, future version, would be to have Python create some
> graphical code (e.g. SVG) that could be passed to the browser to be
> displayed within the output window.]
> 
> Ideally, I would prefer a Python-based solution only.

I guess you need at least AJAX to make it smooth. (Otherwise if you press 
the button, your window is refreshed.)

But other then that: a form with text area + submit button, and a result 
part should do the trick. If you want a "real" editor a lot of JavaScript 
it needed to make it work.

Also note that if your result takes some time you need to send dummy 
headers every now and then to keep the connection alive. And even then 
there might be problems with time outs.

-- 
John                               MexIT: http://johnbokma.com/mexit/
                           personal page:       http://johnbokma.com/
        Experienced programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html



More information about the Python-list mailing list