[Pythonmac-SIG] Double-clickable wxpython application?

Henning Hraban Ramm hraban at fiee.net
Sun Apr 13 20:20:16 CEST 2008


Am 2008-04-12 um 21:07 schrieb Kevin Horton:
> I eventually ran into a performance issue with my widget version, so
> I took another look at wxpython.  With a fresh look, I realized that
> it was an environment issue that was causing the failure to start
> wxpython from an AppleScript or Automator.  I have two scripts - the
> program is started by running the GUI script, which calls wx, and
> sets up the whole GUI.  This script imports another script, which
> holds all the functions that perform the calculations that are the
> whole purpose of this application.  The calculation script reads
> several data files, which live in the same directory as the two

Sounds awfully complicated...

> scripts.  I was using relative paths when opening those data files.
> That worked fine if I started the script from the command line.  But,
> for a reason that I don't yet understand, when using AppleScript, or
> Automator, I needed to use os.chdir() to point to the correct
> directory before loading the data files.

AppleScript has no concept of a "current directory".

BTW, I'd suggest the dabo wrapper for wxPython, it's much easier to  
handle.
(see dabodev.com)
It's in fact a 3-tier framework, but I myself use it only for the GUI.
But, of course, additional libraries make a py2app generated app even  
bigger.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)




More information about the Pythonmac-SIG mailing list