Enthought / ~ischnell

embedder

Ilan Schnell, 2008-07-13

SVN: https://svn.enthought.com/svn/sandbox/embedder/

This tool generates C code suitable for the simplest form of embedding a Python script in C (very high level embedding). The generated C code, which is basically a call to PyRun_SimpleString, features different levels of obfuscation for the string passed to this C/API function, such that inspecting a compiled binary which includes the generated code does not include the Python source as a plain string.

Examples and use cases:

There are many other situations in which one might want to call Python from C. However, most of them will go below very high level embedding, i.e. calling a Python function from C (with arguments and return value). These cases are more complicated and there are almost no tools for automating such tasks; these tool would be the opposite of wrapper tools like SWIG.

References: