xcode 在 iOS 应用程序中运行 python 脚本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14687485/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:42:55  来源:igfitidea点击:

Run python scripts in iOS app

pythoniosobjective-cxcodecocoa-touch

提问by Sergey Fedoseev

I need to run python scripts in ios app. I found this question run a simple python script in iosIn answer he include Python.h

我需要在 ios 应用程序中运行 python 脚本。我发现这个问题在 ios 中运行一个简单的 python 脚本在回答中他包括 Python.h

#include <Python.h>

Where I can get this file? In which library or framework? Compiler said me "Python.h file not found"

我在哪里可以得到这个文件?在哪个库或框架中?编译器告诉我“找不到 Python.h 文件”

I'm using Mac OS X 10.8.2, xCode 4.6 I have Python.framework in System/Library/Frameworks/Python.framework and there Python.h

我使用的是 Mac OS X 10.8.2,xCode 4.6 我在 System/Library/Frameworks/Python.framework 和 Python.h 中有 Python.framework

Please help

请帮忙

采纳答案by dsgriffin

The script you are looking at is for OS X - not iOS. Sadly, iOS does notinclude the Python framework.

您正在查看的脚本适用于 OS X - 而不是 iOS。遗憾的是,iOS包含 Python 框架。