Q:

Python Nested Dict, check 3 different versions if compatible to keys and values

I could not find similar solution out in the forum, sorry if I missed it.
I built a nested dict with view_version:os_name:driver-version, I was trying to check if the view_version,os_name and driver version(all 3 has been parsed in from a log file) are compatible in according to the view_version corresponding to os_name and driver_version in dictionary. What would be a best way to do this I tried accessing the keys and value and compare it but does not seem to work or give any error. New to python and dictionary. Let me know if I need edit it and make it more clear.
Thank you in advance
version_dict = {}
version_dict = {'view 3.1.3': {'windows XP':'11.6.0.35', 'windows vista': '17.14.1.42',     'windows 7': 'not supported', 'windows 8':'not supported', 'windows 8.1' : 'not supported','windows server 20008 R2':'not supported'},
'view 4.0.2':{'windows xp': '11.6.0.35','windows vista': 'not supported','windows 7': 'not supported','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'},
'view 4.5.0':{'windows xp': '11.6.0.37','windows vista': '11.6.0.37','windows 7': '7.14.1.49','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'},
'view 4.6.0':{'windows xp': '11.6.0.37','windows vista': '11.6.0.37','windows 7': '7.14.1.49','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 4.6.3':{'windows xp': '11.6.0.39','windows vista': 'not supported','windows 7': '7.14.1.1052','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.0':{'windows xp': '11.7.5.0','windows vista': '11.7.5.0','windows 7': '7.14.1.1061','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.0.1':{'windows xp': '11.7.5.0','windows vista': '11.7.5.0','windows 7': '7.14.1.1063','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.1.0':{'windows xp': '11.7.20.0','windows vista': 'not supported','windows 7': '7.14.1.1080','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.1.1':{'windows xp': '11.6.0.35','windows vista': 'not supported','windows 7': 'not supported','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.1.2':{'windows xp': '11.7.20.0','windows vista': 'not supported','windows 7': '7.14.1.1208','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.1.3':{'windows xp': '11.7.20.0','windows vista': 'not supported','windows 7': '7.14.1.1.1208','windows 8': 'not supported','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.2.0':{'windows xp': '11.7.20.0','windows vista': 'not supported','windows 7': '7.14.1.1235','windows 8': '7.14.1.1235','windows 8.1': 'not supported', 'windows server 2008 R2': 'not supported'}, 
'view 5.3.0':{'windows xp': '12.0.23.0','windows vista': 'not supported','windows 7': '7.14.1.2021','windows 8': '7.14.1.2021','windows 8.1': '7.14.1.2021', 'windows server 2008 R2': '7.14.1.2021'}, 
'view 5.3.1':{'windows xp': '12.0.23.0', 'windows vista': 'not supported', 'windows 7': '7.14.1.2021','windows 8': '7.14.1.2021','windows 8.1': '7.14.1.2021', 'windows server 2008 R2': '7.14.1.2021'},
'view 6.0':{'windows xp': '12.0.23.0', 'windows vista': 'not supported', 'windows 7': '7.14.1.2032', 'windows 8': '7.14.1.2032', 'windows 8.1': '7.14.1.2032', 'windows server 20008 R2': '7.14.1.2032'}}
            if view_version in version_dict.keys:
                if os_name in version_dict[view_version].keys:
                    if version == version_dict[os_name]:
                        print 'The display driver version'+ version+ 'is compatible with the current'+view_version+'and'+os_name
                    else:
                        print 'The display driver version'+version+ 'is not compatible with the current'+view_version+ 'and'+ os_name

A:

dict.keys is a function, not an attribute. So all those checks should be something like
if view_version in version_dict.keys():
    ...

Note the parentheses after keys that denote a function call.
Also, I don't know if this is a copy-paste error or something, but the indentation of that code chunk at the bottom isn't correct.

