- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
.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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
…...JMP/14/Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
I wish if this could be future enhancement to call JMP from python.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
+ 1 I would like this to be added as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
Add and vote here: https://community.jmp.com/t5/JMP-Wish-List/idb-p/jmp-wish-list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: .jsl Script call from Python
Try this:
>>> import subprocess
>>> subprocess.call(['C:\\space\\SAS\\JMP\\15\\jmp.exe', 'C:\\Users\\v1\\Desktop\\test.jsl'])
The test.jsl file should
- read a file that your Python program wrote before the call to get data
- process
- write a file of answers
- quit();
the Python program can read the file after the call returns. You might want to use CSV files in both directions; JMP and Python can read and write them.