python - Output dictionary to csv file -


i have nested dictionary in following format, used internationalization (this allows our translators , non-programmers edit file necessary; backup plan use json format, not suitable these users..).

dict[language][key] = value 

i output csv file in following format:

key, value-lang-1, ... value-lang-n 

where value-lang-i = dict[language-i][key]

this works fine, long values simple strings. run problem, though, if value more complex (a nested dict or list). there way handle robustly?

it hard suggest alternative format suitable manual editing non-technical users without knowing exact details of data structures want store there (e.g. nested dicts/lists mention).

one obvious suggestion stick computer-friendly format , provide usable gui editing files.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -