该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


The Python Name option for Python Send() has a quoted string argument that contains a valid Python object name. The JMP object sent to Python becomes a Python object with the specified name.
The following example creates the jmp var name variable, assigns it to the Python name python_var_name, submits the print statement, and closes the connection.
Python Send( jmp var name, Python Name( "python_var_name" ) );
Python Submit( "print(python_var_name)" );
The following example creates a variable x in the Here namespace, a variable y in the global namespace, and a variable z that is not explicitly referenced to any namespace. The variable z defaults to Global unless Names Default To Here(1) is on. These variables are then passed to Python.
Python Init(); // initiate the Python connection
Python Send( Here:x );
Python Submit( "print(Here_x)" );
Python Send( ::y ); // ::y creates the Python object y
Python Submit( "print(y)" );
Python Send( Here:x, Python Name( "localx" ) );
Python Submit( "print(localx)" );
Python Send( z ); // z creates the Python object z
Python Submit( "print(z)" );