I am trying to assign a value from a dictionary to a variable but the variable remains unchanged. The value is another dictionary.
The code I used to generate the dictionaries can be found here: http://pastebin.com/Q2Hc8Ktp
I wrote it myself and tested it without this problem.
Here is the code snipit of me trying to copy the dictionary from the dictionary.
_classes = {}
def populateClasses():
print "Classes Exist"
cp = Preferences(''.join([resource_path,"resources.ini"]))
print cp
_classes = cp.getPreferences()['Classes']
populateClasses()
print _classes
When I print out cp it shows the correct data but when I try to print _classes it only shows {}
Note: printing _classes from within the function works as expected but not from outside the function. _classes is defined in the global scope
-Edit-
Here is also some sample data:
[Classes]
Wizard = Arcana, Bluff
Warrior = Endurance, Intimidate
Ranger = Nature, Perception
Bard = Heal, History