html - What's the best data structure for output that's processed by Python? -


my client has text files output tab delimited data , html table chunks. system takes these html table chunks , sticks them in html template file. looking @ outputting data json or xml, , separating out views functions. i've done bunch front-end processes. difference me here i'm processing data on server-side , outputting simple html, instead of populating via javascript. tendency towards json, since outputting few other files in system way.

json best bet. python has excellent json library can provide native python objects 1 function call. docs:

>>> import json >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') ['foo', {'bar': ['baz', none, 1.0, 2]}] 

just save output of json.loads variable , you're off , running.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -