On 30/12/05, Giovanni Bajo <[EMAIL PROTECTED]> wrote:

>>> d = {'.\\sync_pics.py': 1135900993, '.\\file_history.txt': 1135900994,
.... '.\\New Text Document.txt': 1135900552}
>>> file("foo", "w").write(repr(d))
>>> data = ""
>>> data
"{'.\\\\sync_pics.py': 1135900993, '.\\\\file_history.txt': 1135900994,
'.\\\\New Text Document.txt': 1135900552}"
>>> d = eval(data)
>>> d
{'.\\sync_pics.py': 1135900993, '.\\file_history.txt': 1135900994, '.\\New Text
Document.txt': 1135900552}

eval() is risky if you can't control the contents of the file  :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to