reading files into dicts

rbt rbt at athop1.ath.vt.edu
Fri Dec 30 01:07:57 CET 2005


What's a good way to write a dictionary out to a file so that it can be 
easily read back into a dict later? I've used realines() to read text 
files into lists... how can I do the same thing with dicts? Here's some 
sample output that I'd like to write to file and then read back into a dict:

{'.\\sync_pics.py': 1135900993, '.\\file_history.txt': 1135900994, 
'.\\New Text Document.txt': 1135900552}



More information about the Python-list mailing list