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