5
2
mirror of https://github.com/getbible/v2_builder.git synced 2024-11-24 19:47:34 +00:00

Merge pull request #2 from laurajauch/master

Added support for python 3
This commit is contained in:
Jake 2018-03-08 20:49:18 -05:00 committed by GitHub
commit 32facc77e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,9 @@
from pysword.modules import SwordModules from pysword.modules import SwordModules
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): def generate_dict(source_file, bible_version):
modules = SwordModules(source_file) modules = SwordModules(source_file)
@ -49,4 +53,4 @@ def main():
bible_dict = generate_dict(args.source_file, args.bible_version) bible_dict = generate_dict(args.source_file, args.bible_version)
write_json(bible_dict, args.output_file) write_json(bible_dict, args.output_file)
if __name__ == "__main__": main() if __name__ == "__main__": main()