Switching to the built-in json module, with a fallback to the external one
[ejpi] / ejpi / ejpi_qt.py
index 00dea95..31576c5 100755 (executable)
@@ -4,7 +4,11 @@
 from __future__ import with_statement
 
 import os
-import simplejson
+try:
+       import json as simplejson
+except ImportError:
+       print "json not available, falling back to simplejson"
+       import simplejson
 import string
 import logging
 import logging.handlers