[Pythonmac-SIG] How to tell if a .app is clicked again?

Kevin Ollivier kevino at tulane.edu
Sat Aug 20 06:00:51 CEST 2005

Hi Chris,

Sorry for the late reply. ;-/

On Aug 16, 2005, at 1:31 PM, Chris Barker wrote:

> Kevin Ollivier wrote:
>> I can't answer the questions you posed below, as I do almost all  
>> of  my
>> Mac work with wxPython, but when I read about what you're trying   
>> to do
>> I couldn't help but think that this is exactly what ActiveGrid
>> AppBuilder is for:
>> http://www.activegrid.com
>> Granted, it's wxPython and thus not as lightweight, but apps you   
>> create
>> with it can be run locally on the user's machine or can be   
>> deployed to
>> a server with their server components installed. It  allows you to  
>> use
>> SQLite, Oracle, MySQL, or PostGreSQL for the  database. It's also  
>> pretty
>> nice for point-and-click creation of full- fledged database apps,  
>> so the
>> apps are easy to customize. (See their  Petstore demo that comes with
>> the app.) Not sure what your exact  needs are, but this might be at
>> least worth a look if you haven't  seen it already.
> No, I hadn't. It's a little hard to tell what the heck it really is  
> from
> the web page..the usual marketing-speak, no mention of wx, for  
> instance.

It's basically a web app development tool. The big benefit is that  
you can use it to very quickly throw this sort of app together (you  
can just point it at a database, tell it what forms you want, and  
it'll draft a web app for you), which is why I thought you may be  
interested in it. It sets up a local server automatically (based on  
Python's httpserver, like Quioxte, CherryPy, etc.) so that users can  
run and test the web app locally, and then there's a set of server  
components to install to a server. So it'd be similar to your  
situation now where you'd use py2app/py2exe to bundle the server  
components and your web app together.

Of course, if you've already got a static web-app built that you just  
want to be able to run on machines with no (or slow) internet access,  
then there's probably no need to switch tools. I haven't done a bake- 
off of the various httpserver-based web servers out there, so I can't  
say for sure which one best deals with the various quirks in various  
browsers. (I know that ActiveGrid's server handles the IE post bug  
fine where it sends an extra two byte line feed sometimes.)

> However, these are our needs:
> The web version needs to run on a basic browser, with not extra  
> plug-ins
> or custom clients.
> We'd like to make the stand-alone version share as much code as  
> possible
> with the web version. That means the same GUI, which means it would  
> run
> in a browser. It also needs to be a simple install, i.e. not MySQL +
> apache + our app. Activegrid really doesn't seem to provide this, but
> I'll look into it more.
> While I'm talking to Kevin: The other idea I had was to use wxMozilla,
> to embed a browser in a wxPython app, then we could use the same  
> code to
> generate all the HTML, and display the UI through wxMozilla, without
> having to use a client-server set up and http. This came up because
> apparently some Windows systems turn off all TCP/IP when the Ethernet
> cable is disconnected.
> My question is: with wxMozilla, can you capture all the GET and/or  
> events, so that you can essentially run a web app and browser all  
> within
> one process?

At present at least, there's no way to do this using wxMozilla.  
There're probably ways to do this using some Mozilla hacks, but I  
doubt they'd be supported. And considering that even Mozilla's  
primary embedding interface is still (as of 1.7.x) considered a  
'private' interface subject to change, I'm not sure you could even  
rely on the hack to continue working in the future. The server route  
is a bit of a pain but is probably the more sustainable solution in  
the long run.


> -Chris
> -- 
> Christopher Barker, Ph.D.
> Oceanographer
> NOAA/OR&R/HAZMAT         (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
> Chris.Barker at noaa.gov
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

More information about the Pythonmac-SIG mailing list