cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar

Running Python Script from JSL

I would like to run Python script from my JSL code. What is the best way to do that? Thank you

11 REPLIES 11
Craige_Hales
Super User

Re: Running Python Script from JSL

Here's an example I was playing with

txt=runprogram(executable("python"),options({"C:\Users\User\Desktop\tweepy\twpy2.py"}),readfunction("text"));

Tweepy is a python package for twitter.  This example expects the python program to start, produce output, and terminate, before the JSL continues.  There are other ways to use RunProgram.

Craige
nascif_jmp
Level VI

Re: Running Python Script from JSL

Update: Since JMP 14.0 (and much improved in 15.0), the best way to run Python from JSL is now to use the JMP interface implemented in the commands Python Init(), Python Submit(), etc.

More information here: 

https://www.jmp.com/support/help/14-2/python-integration-functions.shtml

For a wrapper that supports running Anaconda virtual environments, check: 

https://community.jmp.com/t5/JMP-Scripts/Anaconda-Environments-Integration/ta-p/221565