We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d8ed3a commit 7f186ccCopy full SHA for 7f186cc
README.MD
@@ -49,14 +49,15 @@ iOS中嵌入Python脚本简单概括来说包括两个部分,
49
* 指定PythonHome
50
* 调用Py_Initialize 完成初始化
51
52
- ```
+ ```
53
NSString * python_home = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"python"];
54
wchar_t * wpython_home = Py_DecodeLocale([python_home UTF8String], NULL);
55
Py_SetPythonHome(wpython_home);
56
Py_Initialize();
57
PyEval_InitThreads(); //初始化多线程
58
PyRun_SimpleString("print('---tata---')");
59
60
+
61
4. 添加Module搜索路径
62
可以通过sys添加搜索路径,可以通过这种方式指定加载沙盒中的代码,可以实现热更新。
63
0 commit comments