From b28c3f68f1c84cc075de0e123cd7d48a1aa2d702 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 22 Apr 2012 15:44:16 -0700 Subject: [PATCH] Add convert.to_json as synonym for json_encode --- cuburn/genome/convert.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cuburn/genome/convert.py b/cuburn/genome/convert.py index 3358e94..a921265 100644 --- a/cuburn/genome/convert.py +++ b/cuburn/genome/convert.py @@ -8,8 +8,9 @@ import numpy as np from variations import var_params import util -# Re-exported +# Re-exported, since it makes the namespace nice and regular from blend import node_to_anim, edge_to_anim +from util import json_encode as to_json class XMLGenomeParser(object): """ @@ -182,4 +183,4 @@ def convert_file(path): if __name__ == "__main__": import sys - print '\n\n'.join(map(util.json_encode, convert_file(sys.argv[1]))) + print '\n\n'.join(map(to_json, convert_file(sys.argv[1])))