Global Variables

Are you importing the module inside the forms you are both setting and referencing the variable from?

Example, create a client side module called “my_globals”, then :

# Form1
import my_globals
...
my_globals.abc = "hello"

# Form2
import my_globals
...
print(my_globals.abc)

This will print “hello” from form 2, assuming you run form 1 first to set the variable.

3 Likes