From a8173aaa99e0f88b64290fc2713ee9d04cf983bb Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Mon, 2 Apr 2012 07:43:34 -0700 Subject: Now works with Python 2.5 (except for one unit test). --- pystache/commands.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pystache/commands.py b/pystache/commands.py index d6fb549..333e665 100644 --- a/pystache/commands.py +++ b/pystache/commands.py @@ -7,7 +7,13 @@ Run this script using the -h option for command-line help. """ -import json + +try: + import json +except: + # For Python 2.5 support: the json module is new in version 2.6. + import simplejson as json + # The optparse module is deprecated in Python 2.7 in favor of argparse. # However, argparse is not available in Python 2.6 and earlier. from optparse import OptionParser -- cgit v1.2.1