EvanED wrote:Python doesn't have true global variables, only module-level variables. "Globals" defined in one module aren't visible in another.
If module m defines a "global" v (just with something like v=10 outside of a function), then other modules that import m can refer to it via m.v, but you need the module qualification just like anything else. (I think that the generally-ill-advised import * from m would make v available unqualified.)
It's from m import *. And the perfectly fine from m import v will also allow you to refer to v unqualified.