Re: Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread KP
Beautiful - thanks! On Tuesday, 22 December 2015 15:23:25 UTC-8, Peter Otten wrote: > KP wrote: > > > I now know how to convert a string cont. coordinates to a tuple, but hwo > > can I do this? > > > > Given > > > > cfg = {'canvas': ('3840', '1024'), > > 'panel1': {'gpio': '1', 'id': '4'

Re: Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread Peter Otten
KP wrote: > I now know how to convert a string cont. coordinates to a tuple, but hwo > can I do this? > > Given > > cfg = {'canvas': ('3840', '1024'), > 'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'}, > 'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'}, >

Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread KP
I now know how to convert a string cont. coordinates to a tuple, but hwo can I do this? Given cfg = {'canvas': ('3840', '1024'), 'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'}, 'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'}, 'panel3': {'gpio': '3', 'id