non-standard builds of wxPython 2.9.1 and Python 2.7.1 in OSX 10.6.6: "This program needs access to the screen" error

Hello,

First, thank you to all the contributors for developing wxPython and
for providing help in this forum.

I built wxPython 2.9.1.1 from source on my Mac OSX 10.6.6 using a non-
standard (non-Framework) build of Python 2.7.1. Unfortunately, when I
try to run my Python code, I get the following error:

"This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged
in on the main display of your Mac."

If I install the Framework binaries, my code runs, but then I can't
integrate some other features that I need. Is there any way to make
this work without the Framework build?

Thanks,
Nasos

···

=======

My Python configure/build:
./configure --enable-shared --prefix=$pythondir
make
make install

My wxPython build (and thanks much for making the build so easy in
2.9.1):
$pythondir/python build-wxpython.py \
   --build_dir=$wxdir/release \
   --install \
   --mac_universal_binary \
   --osx_cocoa

First, thank you to all the contributors for developing wxPython and
for providing help in this forum.

I built wxPython 2.9.1.1 from source on my Mac OSX 10.6.6 using a non-
standard (non-Framework) build of Python 2.7.1. Unfortunately, when I
try to run my Python code, I get the following error:

"This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged
in on the main display of your Mac."

If I install the Framework binaries, my code runs, but then I can't
integrate some other features that I need. Is there any way to make
this work without the Framework build?

no -- at least no easy way -- you need the framework build to access the Mac GUI.

what "other features" do you need? compiling as a Framework shouldn't be providing any restrictions.

by the way:

My Python configure/build:
./configure --enable-shared --prefix=$pythondir

this doesn't look like it'll build a universal binary...

$pythondir/python build-wxpython.py \
    --build_dir=$wxdir/release \
    --install \
    --mac_universal_binary \

so why build wx as universal?

-Chris

···

On 3/3/11 2:17 PM, Nasos Dousis wrote:

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

no -- at least no easy way -- you need the framework build to access the
Mac GUI.

Chris, thanks for your guidance. I reconfigured Python to build to a
non-standard Frameworks path:

./configure --enable-universalsdk --with-universal-archs=intel --
enable-framework=$pythondir/Library/Frameworks

and wxPython now works as desired. Thanks again!

Regards,
Nasos