Considering the following loop
How could the python script access the variable PID ?
Thanks for the help !
Damien
There is no direct way of doing this but there is a simple solution. You can add a PILOT program to print out a Python file (..py) with the variables, and then import this into your Python script.PILOT program code
PRINT LIST='a= 100' FILE="variables.py" PRINT LIST='b= "cube"' FILE="variables.py"
Python code to import variables
from variables import * peint(a) print(b)
Hope this helps!
Hi Ahmed
Thanks for the reply, this isn't what I was expecting but your answer provided a good tip.
I used a pilot to print a data file with the PID value, and added this file as an input in the python script
And it works!
Thanks :)