There a couple things going on here to make use of JMP and Python.
1. JMP has a scripting language and log for JSL.
* Seeing values in JSL, you can evaluate them and see them in the log, you can create or put them in data tables, you can put them in databases or even draw graphic output yourself.
* You can write values to a file.
2. Python is it’s own environment, a and b above hold true in python as well, but by using python statements and programs. Just like JSL’s show displays a JSL value, python’s print( ) statement will print a python variable.
In the Python Send() example in the scripting guide
Names Default To Here( 1 );
Python Init();
x = [1, 2, 3];
Python Send( x );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Python Send( dt );
Close( dt );
Python Submit( "print(x)" );
Python Submit( "print(dt)" );
Python Term();
The Python Submit (“print(x)”); // is executing the python code (“print(x)”) and printing the value of x as seen by Python, it is a separate variable from the JSL x. and until the Python Send(x) there is no variable x on the Python side, only the JSL x
So if by example the above code was
Names Default To Here( 1 );
Python Init();
x = [1, 2, 3];
Python Send( x );
x = [3,2,1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Python Send( dt );
Close( dt );
Python Submit( "print(x)" );
Python Submit( "print(dt)" );
Python Term();
Show( x );
You will get from the Python Submit(“print(x)”) the x being 1, 2 ,3
But from the Show (x);
You would get the 3, 2, 1 you have to remember you operating across two different scripting environments.
I would suggest you get familiar with exploring the capabilities of JSL without python, there are tons of JSL samples and lots of materials to understand working with JSL. And, exploring programming in Python outside of JMP again there are examples too numerous to count on the internet including tutorial sites. Having good familiarity with each, will give you insight into the strengths and weaknesses of each language. Because you need to decide where you want to do which computations. You can do everything in python, passing only initial data and returning results, or you can do most everything in JSL, calling out to python to do some computation or processing that’s easier to accomplish in Python than JSL, or any mix in between.
Paul