wxversion and py2app

I'm using MacOS10.5.4 and Python2.5.1. My program starts with

import wxversion
wxversion.select("2.8.7")

This works fine when I run the program directly.

When I build the program using py2app and then try to launch the
bundle, I get the error "wxversion.VersionError: Requested version of
wxPython not found". I assume that py2app is including 2.8.4 instead
of 2.8.7.

How can I tell py2app to include the proper version? (I had thought
that it would select the correct version based on the
wxversion.select.)

Thanks,

Ian

···

--
Ian York (iayork@iayork.com) <http://www.iayork.com/>
"-but as he was a York, I am rather inclined to suppose him a
very respectable Man." -Jane Austen, The History of England

Hello,

I'm using MacOS10.5.4 and Python2.5.1. My program starts with

import wxversion
wxversion.select("2.8.7")

This works fine when I run the program directly.

When I build the program using py2app and then try to launch the
bundle, I get the error "wxversion.VersionError: Requested version of
wxPython not found". I assume that py2app is including 2.8.4 instead
of 2.8.7.

How can I tell py2app to include the proper version? (I had thought
that it would select the correct version based on the
wxversion.select.)

You can't use wxversion with binary versions of a program that are bundled by py2app or py2exe. You should do something like the following to avoid the problem

import sys
if not hasattr(sys, frozen):
     import wxversion
     wxversion.select("2.8.7")

Cody

···

On Aug 17, 2008, at 9:34 AM, Ian York wrote: