PyObjC + Python 3.0 问题

发布于 2024-07-15 04:52:17 字数 180 浏览 7 评论 0原文

默认情况下,Cocoa-Python 应用程序使用默认的 Python 运行时版本 2.5。 如何配置我的 Xcode 项目以便它使用较新的 Python 3.0 运行时? 我尝试用新版本替换项目中包含的Python.framework,但它不起作用。

还有一件事,PyObjc 模块与新版本的 Python 兼容吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黄昏下泛黄的笔记 2024-07-22 04:52:17

PyObjC 尚不支持 Python 3.0。 根据 PyObjC 开发人员 Ronald Oussoren 的说法,Python 3.0 支持是可能的,但尚未实现:

我的待办事项是对 Python 3.x 的支持
列出但实现起来并不容易。
PyObjC 包含大量
相当低级的 C 代码,得到
3.0 中更改的详细信息
正确并不容易。 我已经调查过
Python 3.x 端口,这应该是
相当简单,但仍然是一对
的工作天数。 我不打算工作
在下一个版本发布之前
PyObjC,这太迟了
是的。

我确信补丁会受到欢迎。

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.

策马西风 2024-07-22 04:52:17

PyObjC 2.3 添加了对 Python 3.1 的初步支持:

该版本需要Python 2.6或更高版本,并且还支持
Python 3.1 或更高版本。

但是也

注意:Python 3 支持目前处于 pre-alpha 阶段:代码可以编译
但尚未通过测试。 该代码还需要审查
检查 python3<->objc 集成(dict.keys 现在返回一个视图,
NSDictionary.keys 仍然返回一个基本迭代器,...)

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文