从 Objective-C 调用到 Python [英] Call from Objective-C into Python

查看:53
本文介绍了从 Objective-C 调用到 Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

bbum 发布了如何做到这一点的大纲,但是我无法完成详细信息.Python 代码去哪里了,我的 Objective-C 代码如何知道它?我将如何在命令行上进行编译?

bbum posted an outline of how to do this, but I'm unable to complete the details. Where does the Python code go, and how will my Objective-C code know about it? How would I do it compiling on the command line?

推荐答案

来源:

从 Objective-C 调用 Python

我已经发布了完整解释如何在我的博客上执行此操作,因为它比我在此处发布的内容要长得多.

I have posted a full explanation of how to do this to my weblog as it is quite a bit longer than something I would post here.

抽象摘要保持不变:使用抽象类提供使 C 编译器满意所需的类型信息和使桥接器满意所需的元数据.

The abstract summary remains the same: use an abstract class to provide the type information necessary to make the C compiler happy and the metadata necessary to make the bridge happy.

这篇关于从 Objective-C 调用到 Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆