Skip to content

Instantly share code, notes, and snippets.

@kkc
Created November 21, 2013 15:35
Show Gist options
  • Select an option

  • Save kkc/7583766 to your computer and use it in GitHub Desktop.

Select an option

Save kkc/7583766 to your computer and use it in GitHub Desktop.
test
# -*- coding:utf-8 -*-
import json
import csv
csv_data = []
for line in open('items.trans.jl'):
try:
data = json.loads(line)
except:
print line
continue
number = data['number']
desc = "".join(data['desc']).strip()
try:
print "%s, %s" % (number, unicode(desc).encode('utf-8'))
except:
#print number
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment