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 Init();
jmp var name = 25;
Python Submit( "print(python_var_name)" );
Python Term();
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.
Here:x = 1;
::y = 2;
z = 3;
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)" );
Python Term();