开发者

Using existing soap client written Python & suds for an iPhone app

I have written a client for JIRA in python and I 开发者_JAVA技巧was wondering if there is any way to use my existing libraries written in python for an iPhone jira client.

I read a little bit about pyObjc which I think is a bridge between the two language.

can I compile my python libraries into ObjC libraries?

If someone can point me in a direction, would appreciate it very much.

btw I am a newbie in both languages.

Thanks


What you probably want to do is to embed a Python interpreter in a native iPhone app and then issue commands for it to run your Python scripts which in turn call your Python libraries.

On boot

  • Create Python interpreter in the app

  • Make it to load your Python libaries

  • Set-up Python environemnt (global vars and such)

And then

  • UI callbacks issue commands to Python interpreter to execute Python functions/scripts

As far as I know you can use C/C++ facilities in XCode to embed the interpreter - I am not sure whether pyobjc is needed at all.

You cannot translate your existing Python source code to ObjC code.

Here is some more info

  • http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages

  • http://blog.tlensing.org/2008/11/04/embedding-python-in-a-cocoa-application/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜