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.