Anton81 wrote:
> Hi,
> 
> I want to use globals that are immediately visible in all modules. My
> attempts to use "global" haven't worked. Suggestions?
> 
> Anton

I think a dictionary would work here
as well as list but not strings and int's

# module1
settings = {
        "release" : "1.0",
        "blabla"  : None,
}

# module2
import module1 as settings
print settings.settings["release"]
settings.settings["blabla"] = True


# module3
import module1 as settings
settings.settings["blabla"] = False

Regards

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to