Asi, did you consider using pickle in binary mode (protocol version 2) to do this? What else is reading these files?
On Thu, Nov 21, 2013 at 7:36 PM, Asi Sudai <[email protected]>wrote: > I gave up on using yaml it's doing some overkill object parsing, that I > don't in my case. > > Json almost gives me what I want, I wish there was a way to control > "depth" like in pprint? > > for example: > data = {'object1':{'a':[1,2,3,4,5], 'b':{'1':[1,2,3,4,5,6]}}} > print json.dumps( data,indent=4,separators=(',',': ') ) > > >> { > "object1": { > "a": [ > 1, > 2, > 3, > 4, > 5 > ], > "b": { > "1": [ > 1, > 2, > 3, > 4, > 5, > 6 > ] > } > } > } > > > ## Would love to have control over depth or better separators, so the > output would be: > { > "object1": { > "a": [1,2,3,4,5], > "b": { > "1": [1,2,3,4,5,6] > } > } > } > > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/eb402d45-c4c1-476b-96a3-a19fb00d1a2a%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAEc3Nf04HUY%3Dqpv5oMg%3Dv_fEqUz2f0JTzpreiXcU0orTm69gLw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
