> {Key11: Value11
> ....
> {Keyn1: Valuen1
> Keyn2: Valuen2
> ...
> Keynn:Valuenn}
>
> Each pair in a dictionary is separated by CRLF and in each dictionary
> numbers of pairs can be different.
> I need to read only the last dictionary.What is a
> best solution?
> Thanks
> Lad

What about (not tested):

stmFile = file(r"Path\FileNameOfTheFileWithDictionaries")
strFile = stmFile.read()
strLastDict = strFile[strFile.rfind('\n{"):]

?

Claudio




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to