Choose Language Hide Translation Bar
Rajat
Community Trekker

.jsl Script call from Python

I prepared a data in python and call jsl script from python and use the output in python again. How can I do that.

0 Kudos
5 REPLIES 5
txnelson
Super User

Re: .jsl Script call from Python

JMP documentation on OLE Automation points to a .PDF file that documents examples on calling JMP from external programs. The PDF can be found the install directory structure for your JMP install
…...JMP/14/Documentation
Jim
Rajat
Community Trekker

Re: .jsl Script call from Python

Thanks @txnelson.
It's a detailed document on OLE Automation but still I am not able to run my jsl script .
I have a jsl script which will generate plots and save to a particular location. I want to call this script from python and in back-end, it will run the script in JMP and save the plots. Can tell me command for the same in python.
Thanks
0 Kudos

Re: .jsl Script call from Python

As was mentioned, driving JMP using automation.  From Python you would need to load one of the Python to COM packages to allow interoperating with JMP's COM automation layer.  Second, would be to launch a JMP process from Python, as if you were launching from the command line with the .jsl script as a command line parameter (I believe this should work, but have not tested).  And lastly you could write a JSL script that listens on a socket and lets you send commands to JMP across the socket.  However you couldn't just send the JSL, since JSL isn't multi-threaded, and it's your script that's maintaining the socket.  Your socket handling script would have parse the recieved data and issues the jsl commands from within it's script.

 

Python support is currently only one way.  JMP can acess python modules and pass data to the running python script and retrieve that data, because it is accessing data in the JMP launched python interpreter.  At present there is no

import jmp 

functionality which would allow you to call into JMP from a seperately launched Python instance.

Rajat
Community Trekker

Re: .jsl Script call from Python

Thanks @Paul_Nelson.
I wish if this could be future enhancement to call JMP from python.
0 Kudos
txnelson
Super User

Re: .jsl Script call from Python

Please add this request to the JMP Wish List
Jim