Shouldn't imported modules go bye-bye after the script runs?

imports stick around

In the Macro Panel, each run is performed in the same Python context as the preceding runs. This means that imports and also class/function/variable/… definitions from previous runs are still available in later runs.

1 Like

Yessir! That is the behavior that seems like a bug. Shouldn’t it be a new context for each run? And particularly if the user closes the macro window and reopens it?


You are probably right. I’ll see what I can do. But there are several things that will always be persistent, like objectiveC classes.

1 Like