Python-obj
LabTalk Object Type:
The Python object provides script access for running basic Python commands and exchange data with Python console.
Initiate the Python application.
Check and ask user to install Python packages. Return 0: All OK 1: Installation needed and initiated 2. Embedded python not installed 3. No internet connection or user refused to install
Execute one or multiple Python command lines via string strCommand.
Send Origin data range OriginRange to Python as object PyObjectName.
Receive Python object as Origin data range OriginRange.
Assign the numeric value of Python object PyObjectName to Origin variable LabTalkVar.
Assign the numeric value of Origin variable LabTalkVar to Python object PyObjectName.
Assign the string value of Python object PyObjectName to Origin string variable LabTalkVar.
Assign the string value of Origin string variable LabTalkVar to Python object PyObjectName.
// set a new working directory for Python functions Python.LTwd$="D:\Python"; // search "myfuncs.py" for function "sort()" col(b) = py.myfuncs.sort(col(a)); // set working file name and search it for function sort()" Python.LTwf$=myfuncs.py; col(b) = py.sort(col(a));
i=Python.chk("pandas cv2(opencv-python)");
Please view this page for additional examples.