On 18/12/12 06:30:48, Gnarlodious wrote:
> This problem is solved, I am so proud of myself for figuring it out!
> After reading some of these ideas I discovered the plist is really
> lists underneath any "Children" key:
> 
> 
> from plistlib import readPlist
> 
> def explicate(listDicts):
>       for dict in listDicts:
>               if 'FavIcon' in dict:
>                       del dict['FavIcon']
>               if 'Children' in dict:
>                       dict['Children']=explicate(dict['Children'])
>       return listDicts

It would be more Pythonic to return None, to indicate that you've
changed the list in situ.

Since None is the default return value, this means you can leave
out the return statement.


Hope this helps,

-- HansM

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

Reply via email to