From f3b921a58cb66fe5f851c1ecce1a566919ea1ce8 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Devenyi" Date: Thu, 21 Jul 2016 09:52:21 -0400 Subject: [PATCH] Import future print in case of python2 environment --- bin/extract_figures.py | 2 +- bin/lesson_initialize.py | 2 +- bin/repo_check.py | 1 + bin/util.py | 1 + bin/workshop_check.py | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/extract_figures.py b/bin/extract_figures.py index 15b079e..56ee812 100755 --- a/bin/extract_figures.py +++ b/bin/extract_figures.py @@ -6,7 +6,7 @@ import glob from optparse import OptionParser from util import Reporter, read_markdown, IMAGE_FILE_SUFFIX - +from __future__ import print_function def main(): """Main driver.""" diff --git a/bin/lesson_initialize.py b/bin/lesson_initialize.py index 7806510..9f37263 100755 --- a/bin/lesson_initialize.py +++ b/bin/lesson_initialize.py @@ -5,7 +5,7 @@ import sys import os - +from __future__ import print_function ROOT_AUTHORS = '''\ FIXME: list authors' names and email addresses. diff --git a/bin/repo_check.py b/bin/repo_check.py index 4a8d98b..2c84e54 100755 --- a/bin/repo_check.py +++ b/bin/repo_check.py @@ -11,6 +11,7 @@ import re from optparse import OptionParser from util import Reporter, load_yaml, require +from __future__ import print_function # Import this way to produce a more useful error message. try: diff --git a/bin/util.py b/bin/util.py index dba8004..e59866f 100644 --- a/bin/util.py +++ b/bin/util.py @@ -2,6 +2,7 @@ import sys import os import json from subprocess import Popen, PIPE +from __future__ import print_function # Import this way to produce a more useful error message. try: diff --git a/bin/workshop_check.py b/bin/workshop_check.py index 1dcd33c..3699c99 100755 --- a/bin/workshop_check.py +++ b/bin/workshop_check.py @@ -9,7 +9,7 @@ import os import re from datetime import date from util import Reporter, split_metadata, load_yaml, check_unwanted_files - +from __future__ import print_function # Metadata field patterns. EMAIL_PATTERN = r'[^@]+@[^@]+\.[^@]+' -- GitLab