Is there a better way to have python remember variables between recomputes than using sticky variables? I have been working on a CNC project where I generate motor movement commands through grasshopper. I also wrote a component in python that will simulate the motion/position of the machine. I “animate” the simulation by stepping through each line of the commands by using recompute/F5. And I use sticky variables to hold a bunch of different things that I want to carry through between each recompute (is there a better word for this). The script works, I am just curious if there is a better solution than sticky variables. I found having to type the extra brackets and quotation marks kind of tedious. Is there a work around? Sticky class?
from scriptcontext import sticky as st st['myvariable']="works, but does not look natural"