python-embedding

Minimal Python build for my application's scripting needs?

Hi all, what are your advices on building a very minimalistic version of Python(2.x) for my application's scripting needs. My main motive here is to keep the foot print (both memory and disk wise) as low as possible so that my native application won't suffer from any major performance hit. Even the Python DLL size is in consideration b...

embed python in matlab mex file on os x

I'm trying to embed Python into a MATLAB mex function on OS X. I've seen references that this can be done (eg here) but I can't find any OS X specific information. So far I can successfully build an embedded Python (so my linker flags must be OK) and I can also build example mex files without any trouble and with the default options: jm...

Limiting the features of an embedded python instance

Is there a way to limit the abilities of python scripts running under an embedded interpretor? Specifically I wish to prevent the scripts from doing things like the following: Importing python extension modules (ie .pyd modules), except those specifically allowed by the application. Manipulating processes in any way (ie starting new pr...

Looking for a smarter way to convert a Python list to a GList?

I'm really new to C -> Python interaction and am currently writing a small app in C which will read a file (using Python to parse it) and then using the parsed information to execute small Python snippets. At the moment I'm feeling very much like I'm reinventing wheels, for example this function: typedef gpointer (list_func)(PyObject *o...

Embedding IronPython in a WinForms app and interrupting execution

BACKGROUND I've successfully embedded IronPython in my WinForm apps using techniques like the one described here: http://blog.peterlesliemorris.com/archive/2010/05/19/embedding-ironpython-into-a-c-application.aspx In the context of the embedding, my user may any write loops, etc. I'm using the IronPython 2.6 (the IronPython for .NET 2....

Multiple independent embedded Python Interpreters on multiple operating system threads invoked from C/C++ program

Embedding Python interpreter in a C/C++ application is well documented. What is the best approach to run multiple python interpreter on multiple operating system threads (i.e. one interpreter on one operating system thread within the same process) which are invoked from the C/C++ application? Such applications may also have problems rela...

How to resolve bindings during execution with embedded Python?

I'm embedding Python into a C++ application. I plan to use PyEval_EvalCode to execute Python code, but instead of providing the locals and globals as dictionaries, I'm looking for a way to have my program resolve symbol references dynamically. For example, let's say my Python code consists of the following expression: bear + lion * ...

pywin32 captive installation (avoid py*.dll getting installed in system32 directory)

I have python as an embedded scripting environment in my application. I supply the python bits (python26.dll, DLLs & Lib folders) with my application. All this to avoid asking users to install python (you know how it goes in big corporations). All works nice except pywin32. It installs pythoncom26.dll and pywintypes26.dll to the system3...