[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] setting + modifying a variable for use across the entire application
Arg... one more time with bug fixed.
# config.py
someconfigvar = "hello"
#Then in each module you can just do...
# file1.py
import config
config.mutated = 1
#file2.py
import config
x = config.mutated
#file3.py
import file1
import file2
print (file2.x) # should print 1