[Pythonmac-SIG] PyObjC ScreenSaver on 10.7

Ronald Oussoren ronaldoussoren at mac.com
Wed Dec 26 09:55:31 CET 2012


On 26 Dec, 2012, at 5:33, "Berg, Stuart" <bergs at janelia.hhmi.org> wrote:

> Greetings,
> 
> I'm new to PyObjC, but it looks great.  I can run basic examples, but the ScreenSaver example in the docs doesn't seem to work on 10.7:
> http://packages.python.org/pyobjc/examples/ScreenSaver/SillyBallsSaver/index.html
> 
> Someone on stack overflow seems to be having the same trouble as me:
> http://stackoverflow.com/questions/7821589/compile-64-bit-mac-app-with-py2app
> 
> But I don't think that 32-bit vs. 64-bit is the issue. (I'm able to run non-screensaver examples…)
> 
> Does anyone know if the ScreenSaver framework pyobjc wrappers are still supported for OS 10.7?

The screensaver framework should work just fine, but only if the bundle contains 64-bit code.

What is the output of 'file SillyBalls.saver/Contents/MacOS/SillyBalls' ?

On my (OSX 10.8) machine this says:

$ file dist/SillyBalls.saver/Contents/MacOS/SillyBalls 
dist/SillyBalls.saver/Contents/MacOS/SillyBalls: Mach-O universal binary with 2 architectures
dist/SillyBalls.saver/Contents/MacOS/SillyBalls (for architecture i386):	Mach-O bundle i386
dist/SillyBalls.saver/Contents/MacOS/SillyBalls (for architecture x86_64):	Mach-O 64-bit bundle x86_64

This binary also works when I load it in System Preferences (at least, the preview does, I haven't waited long enough yet to check if it also works when the screensaver kicks in).

> 
> By the way, I'm using Xcode 4.5.2.  I know that Xcode 4 threw a wrench in some aspects of pyobjc.  Is this an example of that?

I don't think so. This is most likely a 32-bit vs. 64-bit issue.

I'm using a custom 32-bit/64-bit build of Python 2.7 (from the python.org repository), pyobjc from the pyobjc repository and the most recent release of py2app, all of this running on OSX 10.8.

Which versions of python, pyobjc, and py2app do you use (and for the python versions, is this the apple provided one or some other install)?

Ronald

> 
> Thanks,
> Stuart
> 
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG



More information about the Pythonmac-SIG mailing list