[Pythonmac-SIG] Python embedding in LabVIEW on Mac? (oops, found part of the
Marcus H. Mendenhall
Thu, 20 Jun 2002 11:58:43 -0500
>I recently came across a need to access Python code from inside of
>LabVIEW to do some data analysis. Under LabVIEW 6i for Windows,
>calling Py_Initialize works fine. Using LabVIEW 5.0.1 under MacOS
>8.x and 9.x (OK, I haven't updated my LabVIEW install yet to
>anything approaching current... anyone know if it is OK under LV6
>for Mac?) calling Py_Initialize results in LabVIEW quietly exiting.
>It appears that ExitToShell() is called, since there is no sign of
>of a crash.
>Under what conditions does Py_Initialize fail in such a way? I have
>tried starting LabVIEW from various directories, including the one
>containing PythonCore, in case paths are bad resulting in inability
>to find resources. If have also called Py_SetProgrameName before
>PyInitialize, with the full path to PythonCore as the name, just in
>case that would help. No luck.
>Since it is likely a quite painful process to follow through the
>innards of LabVIEW with a debugger, it seems more likely to be
>fixable by following through the Python startup.
>Thanks for any ideas anyone might have, before I waste a lot of time
>poking around my self rather blindly.
>Vanderbilt University Free Electron Laser Center
OK, in response to my own post (sorry), I found an oops involving
calling Py_Initialize instead of PyMac_Initialize . Now, LabVIEW
gets much farther into the embedding startup, but still doesn't quite
work. The remaining, important question is whether any has had this
work under newer version of LabVIEW, since the 5.0.1 release is quite