Resort to regular expressions. Begin with:
import re
s = file('something.txt', 'rt').read()
Then, if it's OK for the dictionary values to be strings, use:
d = dict( re.findall(r'^(\S),\S,(\d)$', s, re.M) )
Otherwise use:
d = dict( (key, int(val)) for (key, val) in re.findall(r'^(\S),\S,(\d)$', s, re.M) )
In both cases, the key is
re.findall(r'^(\S),\S,(\d)$', s, re.M)
It will extract only the lines that match the expected pattern (non-blank,non-blank,digit), and return a list of tuples containing the 1st and 3rd item. All that's left to do then is to convert these tuples into a dictionary of the desired format (string => string or string => int).
Depending on what your expected pattern is, you may substitute '\W' or '[A-Za-z]' for '\S'. Consult the re module docs for more information.