English 中文(简体)
你们如何把PyObjC的法典从目标C中说出来? [复制]
原标题:How do you call PyObjC code from Objective-C? [duplicate]
This question already has an answer here:
Closed 11 years ago.

Possible Duplicate:
Calling Python from Objective-C

I m a long-time-030 programr and short-time Cocoa programmer. 我刚刚从PyObjC开始,这真是令人惊讶的是,它很容易去做。 尽管如此,我希望利用纯粹的奥比奇来为我的控制者使用PyObjC模式。 我也许可以享受让·沙尔扎斯,目标C是目标C。

我可以不了解或找到任何东西,说明为什么要从目标C中打捞,而只是用其他方式。 有些人可以向我指出这方面的任何资源? (5月,这是否出现在PyObjC现场,但我不知道我看什么?)

Edit:我最感兴趣的是,在基础一级,能够打电话给Adhur模块,并收回一些本土的ObjC数据类型。

最佳回答

谁是谁,我应该再找一比一点:

从目标C引诱

问题回答

有几个可能的办法。 最有诱惑力的是,利用Py2pp汇编一种可装饰的dle子,由您使用NSBundle进入主要类别。 不幸的是,这一使用案例没有从Py2应用开发商那里得到多少爱,我发现10.5和10.6个 b,包括从Python回到目标C时的原始记忆泄露。

第二种做法是推翻embe。 撰写彩虹可可 app,从一开始(主(七))的面包店装上目标C代码。 如果你已经掌握了大的“目标”表,这或许需要做一些工作。 我知道的唯一不利之处是,你在《目标守则》中获得了使用GC的能力,但这实际上是与PyObjC合作的普遍限制。

最后,你可以在您的《目标守则》中调用一位 interpreter译员,以装上你的 code。 这显然涉及更多的问题,但如果你已经建立了目标明确的编码基础,希望注入你的 p。 在Xcode中,从Alma-Cococa应用模板中提取的主要卷宗是开始采取行动的好场所。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签