diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-08-06 19:56:45 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-08-06 19:56:45 (GMT) |
commit | 7a18ecfdc19201647c46dfe18dc650d0c4bc4acc (patch) | |
tree | 5103a7e8773daa24be2b8d6357b186665508a52b /mainscreen.py | |
parent | 7c39d268d2099d095b4d0b825897efa628475143 (diff) |
Support json in python25 environment
Diffstat (limited to 'mainscreen.py')
-rw-r--r-- | mainscreen.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mainscreen.py b/mainscreen.py index 8af4f93..fee7c4f 100644 --- a/mainscreen.py +++ b/mainscreen.py @@ -15,8 +15,9 @@ # along with Typing Turtle. If not, see <http://www.gnu.org/licenses/>. # Import standard Python modules. -import logging, os, math, time, copy, cjson, locale, datetime, random, re, glob +import logging, os, math, time, copy, locale, datetime, random, re, glob from gettext import gettext as _ +from port import json # Import PyGTK. import gobject, pygtk, gtk, pango @@ -126,7 +127,7 @@ class MainScreen(gtk.VBox): for f in glob.iglob(path + '/*.lesson'): fd = open(f, 'r') try: - lesson = cjson.decode(fd.read()) + lesson = json.loads(fd.read()) self.lessons.append(lesson) finally: fd.close() |