このバージョンのヘルプはこれ以降更新されません。最新のヘルプは https://www.jmp.com/support/help/ja/15.2   からご覧いただけます。


次の例では、JMP変数xyをPythonに送り、Pythonステートメントz = x * yを実行して、Python変数zを取得してJMPに戻します。
Python Init();
x = [1 2 3];
Python Send( x );
y = [4 5 6];
Python Send( y );
Python Submit( "\[
import numpy as np
p = np.multiply(x, y) # matrix product
]\" );
p = Python Get( p );
Show( p );
Python Term();
Python Init(); // Python接続を初期化する
 
qbx = "The right stuff";
Python Send( qbx );
//変数qbxと「Animals.jmp」データテーブルをPythonに送る
 
dt = Open( "$SAMPLE_DATA/Animals.jmp" );
Python Send( dt );
Close( dt, nosave );
 
qbx = Python Get( qbx );
// Python変数qbxの値を取得し、それをJMP変数qbxに代入
 
df = Python Get( dt );
/* Python変数dtのデータフレームを、JMPの変数dfにて参照される
	JMPデータテーブルとして取得*/
 
Python Term();
 
Show( qbx );
df << New Data View;
Wait( 10 );
Close( df, nosave );
Python Term();
Python Init(); // Python接続を初期化する
commands =
"
friends = ['john', 'pat', 'gary', 'michael']
print(friends)
for i, name in enumerate(friends):
    print( \!"iteration {iteration} is {name}\!".format(iteration=i, name=name))
";
Python Submit( commands );
Python Term();