From 041f65ae6dcdc22d235c0ef7fe05b53334a4d1ff Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 06 Aug 2009 16:31:00 +0000 Subject: Adopt to json changes in python-2.6 #711 --- (limited to 'typingturtle.py') diff --git a/typingturtle.py b/typingturtle.py index e9c2f9e..e09fc71 100755 --- a/typingturtle.py +++ b/typingturtle.py @@ -115,7 +115,7 @@ class TypingTurtle(sugar.activity.activity.Activity): try: text = fd.read() print "read %s" % text - self.data = json.read(text) + self.data = json.loads(text) finally: fd.close() @@ -129,7 +129,7 @@ class TypingTurtle(sugar.activity.activity.Activity): fd = open(file_path, 'w') try: - text = json.write(self.data) + text = json.dumps(self.data) fd.write(text) print "wrote %s" % text finally: -- cgit v0.9.1