Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-10-10 12:40:57 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-10-10 12:40:57 (GMT)
commitee81d0497d102e0a749261fe5d23481f1d5d3cf3 (patch)
tree02421a78ad713f70b688dbf8cfd955741a0568df /TurtleArt
parente8db0e6cf9c4e03b59fbc5581118dff589272b4a (diff)
add a newline between json blocks on dump; removing it on load
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tautils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py
index 5c4614c..8229166 100644
--- a/TurtleArt/tautils.py
+++ b/TurtleArt/tautils.py
@@ -165,7 +165,7 @@ def data_from_file(ta_file):
def data_from_string(text):
""" JSON load data from a string. """
- return json_load(text)
+ return json_load(text.replace(']],\n', ']], '))
def data_to_file(data, ta_file):
""" Write data to a file. """
@@ -175,7 +175,7 @@ def data_to_file(data, ta_file):
def data_to_string(data):
""" JSON dump a string. """
- return json_dump(data)
+ return json_dump(data).replace(']], ', ']],\n')
def do_dialog(dialog, suffix, load_save_folder):
""" Open a file dialog. """