Revision: 7000 Author: russblau Date: 2009-06-26 21:39:25 +0000 (Fri, 26 Jun 2009)
Log Message: ----------- Use Standard Library json module if available (in Python 2.6)
Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2009-06-26 19:16:50 UTC (rev 6999) +++ branches/rewrite/pywikibot/data/api.py 2009-06-26 21:39:25 UTC (rev 7000) @@ -11,7 +11,10 @@
from UserDict import DictMixin from datetime import datetime, timedelta -import simplejson as json +try: + import json +except ImportError: + import simplejson as json import logging import re import traceback
Modified: branches/rewrite/scripts/category_redirect.py =================================================================== --- branches/rewrite/scripts/category_redirect.py 2009-06-26 19:16:50 UTC (rev 6999) +++ branches/rewrite/scripts/category_redirect.py 2009-06-26 21:39:25 UTC (rev 7000) @@ -23,7 +23,6 @@
import pywikibot from pywikibot import pagegenerators -import simplejson import cPickle import math import re
pywikipedia-svn@lists.wikimedia.org