[Tutor] How to import a dictionary from another module?

David Aldrich David.Aldrich at EMEA.NEC.COM
Mon Jun 15 13:03:27 CEST 2015


Hi

I have defined a dictionary in a module:

mydir.py:

REG_LOOKUP = {
    'REG_1' : some_value1,
    'REG_2' : some_value2,
}

How would I import that dictionary from my main() function (which lives in a different module) please?

Best regards

David



More information about the Tutor mailing list