[wxPython-users] Re: embedding PHP to a GUI

Christopher Barker Chris.Barker at noaa.gov
Thu Nov 16 12:32:53 PST 2006


Vincent Hirth wrote:

> Where the images and html pages will be saved, on the user's PC?

What images and html pages???

I think you need to describe more what you need to do, and then we can 
help you figure out how to accomplish it.

I'm quite confused about what is is you're doing -- if you are writing a 
web app, then you do you stuff on the server, with PHP (or better yet 
Python on the server), and send your html+Javascript to a browser 
client. In that case, what do you need wxPython for?

If you are writing a custom client for a server app, then you don't' 
need to follow the html+Javascript paradigm at all -- your server (which 
could be written in anything) can send the required data to your custom 
client in any form (plain text, XML, ..... whatever), and your client 
can display it however it wants. wxPython is an excellent tool for this, 
but you don't need a browser or Javascript. You may want use the 
wxHtmlWindow to display formatted text -- it's an easy way to do that, 
but in that case, the html is an implementation detail.

If you want to make a stand-alone, then talk to MySQL directly from 
Python, write your GUI in Python, and networking and html have nothing 
to do with it (check out Dabo for this, but the way). MySQL could be 
running remotely for this also.

Yet another option is a Browser Interface, Local Server (BILS- a friend 
of mine coined this one) app. In this case, your browser is the the full 
interface, and the server can run on the same machine, or over the net, 
either way. This is a way to write a stand-alone and web app that share 
almost all of the same code. IN this case, Python (and many of the web 
frameworks that use Python) makes it pretty easy to run a self-contained 
server, but wxPython wouldn't have to be involved at all.

You could need a hybrid of some of the above, which would require 
embedding a browser in your wxPython app -- for that, you do need to do 
it a little differently all different platforms  -- ie or Mozilla on 
Windows, Mozilla on Linux, and Safari on OS-X. Somewhere out there is 
some code that wraps these with a common interface, but I don't' 
remember where at the moment.

-Chris









More information about the wxpython-users mailing list