cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
vharibal
Level II

How to edit folder path in jsk using python

Hi,

I am using JMP 17 Pro

 

I have jsl with folder names which needs to be changed dynamically. I want to use python to make this change, which receives new folder paths info from server

 

I am able to open jsl using python and printing python variable in jsl using below link

https://community.jmp.com/t5/Discussions/How-to-pass-arguments-from-Python-to-jmp-script-while-runni...

 

Can I use python to edit a folder path in JSL?? This will allow to both make changes to jsl folder path and run jsl directly using python

 

 

1 REPLY 1

Re: How to edit folder path in jsk using python

Some design thoughts:

  • Do you need to use Python to get the updated server paths, or can you do that from JSL using the http request capabilities in JSL?
    • If you have to use Python, I would suggest creating a JSL user defined function, and use JSL Python Execute() to implement a JSL function whose functionality is written in Python. ( in the Python Execute ).  Python Execute() allows you pass in a JSL list of input variables and pass in a list of output variables for the results.  Either just explicitly pass in all the variables or use Associated Array in JSL which becomes a Python Dictionary across the Python Send() / Get APIs.

Regardless I would be making your JSL script the controlling script with variables for the folder paths.  Getting the information from the server either via JSL or Python into some data structure, (like list or associative array ), and iterating on the returned data to fill in the path variable.

 

The scripting index under the Help menu contains documentation and runnable sample code for the scripting features available within JMP.  In my opinion, it should be everybody's primary go-to source for JMP scripting information.  

 

JMP 18 makes things dramatically better for running Python scripts within JMP and interoperating with JMP and JSL structures.