MSX variable in Python script


#1

Hello!

i’m trying to use my MSX variable into a python script but it doesn’t seem to work.
Here’s my python code:
python.Execute("
import sys

SCRIPT_FOLDER = ‘c:\mypath\myscript’
if SCRIPT_FOLDER not in sys.path:
sys.path.append(SCRIPT_FOLDER)

import myscript_ui
myscript_ui.generate_ui()
")

my MSX code is pretty simple:
global pathToScript = @“c:\mypath\myscript”

How can I replace SCRIPT_FOLDER = ‘c:\mypath\myscript’ with pathToScript ?
Thank you!