From 2ca5daff45147ca587047f48cf255b51cbedd515 Mon Sep 17 00:00:00 2001 From: laurajauch Date: Thu, 8 Mar 2018 20:37:14 -0500 Subject: [PATCH] Version check Check python version and import from past if necessary --- sword_to_json.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sword_to_json.py b/sword_to_json.py index e59529f..caf3dcb 100644 --- a/sword_to_json.py +++ b/sword_to_json.py @@ -1,6 +1,9 @@ from pysword.modules import SwordModules -from past.builtins import xrange -import argparse, json +import argparse, json, sys + +if sys.version_info > (3, 0): + from past.builtins import xrange + def generate_dict(source_file, bible_version): modules = SwordModules(source_file)