Save script variables in memory until next script run

Hi all,

I want to save the input from current script until next time I open it. (or Rhino closes)
Is there a way to do this?
I’m doing python and would like to stay in that language if possible.
I’m new to programing so please keep it simple if possible.
I know that the easiest way would be to read/write to a file, but I would like to do it some other way.

Thanks in advance.

Hi socken,

If you are interested in saving those values up until Rhino is closed, you can use the sticky dictionary.

Otherwise (you want the values to be saved even when you close Rhino), you will have to write them to a file.

Thanks djordje,

That solved my problem.

Can you write them to the Notes or UserData?