Created
May 20, 2011 03:37
-
-
Save PyYoshi/982298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def import_simplejson(): | |
try: | |
import simplejson as json | |
except ImportError: | |
try: | |
import json # Python 2.6+ | |
except ImportError: | |
try: | |
from django.utils import simplejson as json # Google App Engine | |
except ImportError: | |
raise ImportError, "Can't load a json library" | |
return json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment