albertz / python-embedded

Python build script to create a small embeddable static Python lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python embedded

Build a single static library with Python and PyCrypto.

This passes test_crypto() in binstruct.


I tried a sample iOS binary where I linked against libpython.a and copied the pylib directory into Resources (following not-included symlinks).

This is the sample code:

Py_SetProgramName((char*)[[[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/"] UTF8String]);
Py_Initialize();
PyRun_SimpleString("print 'Hello world!'");

And it works. :)

About

Python build script to create a small embeddable static Python lib


Languages

Language:C 94.7%Language:C++ 4.0%Language:Objective-C 1.1%Language:Python 0.2%