python can a imported module get variables from main module

30

import shared_stuff
def f():
    print shared_stuff.a
import shared_stuff
import module1
shared_stuff.a = 3
module1.f()

Comments

Submit
0 Comments