Subscribe Bookmark RSS Feed

Running Python Script from JSL

felix_doktorman

Community Trekker

Joined:

Nov 7, 2015

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

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Use the
RunProgram()
function.
For details, go to:
Help==>Scripting Indes==>RunProgram
Jim
Craige_Hales

Staff

Joined:

Mar 21, 2013

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