PyObjC + Python 3.0 Questions
Asked Answered
N

2

10

By default, a Cocoa-Python application uses the default Python runtime which is version 2.5. How can I configure my Xcode project so that it would use the newer Python 3.0 runtime? I tried replacing the Python.framework included in the project with the newer version but it did not work.

And another thing, are PyObjc modules compatible with the new version of Python?

Namesake answered 20/3, 2009 at 13:30 Comment(2)
He has to be using OS X if he's using Xcode.Jankell
I would just stick with 2.5. I doubt Cocoa-Python3.0 is even reliable.Jankell
R
9

PyObjC does not yet work with Python 3.0. According to Ronald Oussoren, a (the?) PyObjC developer, Python 3.0 support is possible, but not yet implemented:

Support for Python 3.x is on my todo list but is non-trivial to achieve. PyObjC contains a large amount of pretty low-level C code, getting the details w.r.t. to the changes in 3.0 right is not easy. I have looked into a Python 3.x port and this should be fairly easy, but it's still a couple of days work. I'm not planning to work on that before the next release of PyObjC, that's way too long overdue as it is.

I'm sure patches would be welcomed.

Rottweiler answered 20/3, 2009 at 19:20 Comment(1)
I guess I have to wait. Thanks for the answer!Namesake
H
2

PyObjC 2.3 added initial support for Python 3.1:

This version requires Python 2.6 or later, and also supports Python 3.1 or later.

but also

NOTE: Python 3 support is pre-alpha at this time: the code compiles but does not pass tests yet. The code also needs to be reviewed to check for python3<->objc integration (dict.keys now returns a view, NSDictionary.keys still returns a basic iterator, ...)

http://svn.red-bean.com/pyobjc/tags/pyobjc-2.3/pyobjc-core/NEWS.txt

Hexavalent answered 16/12, 2010 at 18:23 Comment(1)
anyone know what the current status of this situation is??Atal

© 2022 - 2024 — McMap. All rights reserved.