Hi; I have data in a file and I would like to write it to a dictionary, and then perform commands on it, something like this:
input = "/usr/local/machine-lang-trans/dictionary.txt" input = open(input,'r') dict = "{" for line in input: ? tup = re.split(','line) ? dict += '"' + tup[0] +'":"' + tup[1] +'", ' dict += "}" input.close() Of course, that will just give me a string. How do I convert it to, or make from scratch, a dictionary of that? TIA, Tony ________________________________________________________________________ More new features than ever. Check out the new AOL Mail ! - http://webmail.aol.com
-- http://mail.python.org/mailman/listinfo/python-list