diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-02 07:43:34 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-02 19:24:19 -0700 |
commit | a8173aaa99e0f88b64290fc2713ee9d04cf983bb (patch) | |
tree | c13ab67834f1c35d610290d5e891532bb26cf061 | |
parent | b975e6aa1c68d37e812b0a723d4b6af919f42c61 (diff) | |
download | pystache-a8173aaa99e0f88b64290fc2713ee9d04cf983bb.tar.gz |
Now works with Python 2.5 (except for one unit test).
-rw-r--r-- | pystache/commands.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 |