python embeddingAuthor: Dave Date: 08.23.23 - 10:47pm As i am required to work more with python, I am going to want to interact with it closer from native code. Shelling out to command line scripts is fine for most things honestly..but what if I just want to use a python feature from my native code. So many libraries. I experimented with this years ago, but now I cant ignore it anymore :( Edit: I also started experiments with VB embedding here that include interacting with vb com objects, threading, and even a basic debugger implementation Here is something small to play with in C (note something in my blog ate the embedded new lines and back slashs) output is: 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:30:09) [MSC v.1934 32 bit (Intel)] ['arg1', 'arg2'] ['C:Py311embedembed', 'C:Py311python311.zip', 'C:Py311DLLs', 'C:Py311Lib', 'C:Py311embedRelease', 'C:Py311', 'C:Py311Libsite-packages'] hi: test xx=64 c ret: 777 in myFunc:999 script var1=123 #define PY_SSIZE_T_CLEAN #include Comments: (0) |
About Me More Blogs Main Site |