Scripting Guide > Extending JMP > Work with Python > JMP-to-Python Interfaces
发布日期: 08/07/2020

JMP-to-Python Interfaces

JMP provides the interfaces to access Python that are described in the following sections. The basic execution model is to first initialize the Python connection, perform the required Python operations, and then terminate the Python connection. In most cases, these functions return 0 if the Python operation was successful or an error code if it was not. If the Python operation is not successful, a message is written to the log. The single exception to this is Python Get(), which returns a value.

Python JSL-Scriptable Object Interfaces

The Python interfaces are also scriptable using a Python connection object. A scriptable Python connection object can be obtained using the Python Connect() function.

// return a Python connection scriptable object

PythonConnection = Python Connect();
 

// return 1 if a Python connection is active. Otherwise, returns 0.

x = PythonConnection << Is Connected;
Show( x );
PythonConnection << Disconnect;

x = 1;

0

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).