From 5c4c3ba342a0277bacbba4ad71bc63964e1e1076 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 21 Aug 2017 11:51:54 +0200 Subject: [PATCH 1/2] from __future__ import print_function Without this change, the `file` parameter in print() causes problems in Python 2. This approach makes print(x, file=filename) valid syntax in both Python 2 and Python 3. --- auto_sort/asort.py | 1 + 1 file changed, 1 insertion(+) diff --git a/auto_sort/asort.py b/auto_sort/asort.py index 3add637..9a21144 100644 --- a/auto_sort/asort.py +++ b/auto_sort/asort.py @@ -8,6 +8,7 @@ # Version: 0.1 # Description: A very simple python script that can sort items alphabetically. +from __future__ import print_function import os import shutil From 79ff6147ba99493754a15f278bb48181f0e226ba Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 21 Aug 2017 11:53:37 +0200 Subject: [PATCH 2/2] from __future__ import print_function Without this change, the `end` and `file` parameters in print() causes problems in Python 2. This approach makes print(x, file=filename) valid syntax in both Python 2 and Python 3. --- auto_sort/asort_zh.py | 1 + 1 file changed, 1 insertion(+) diff --git a/auto_sort/asort_zh.py b/auto_sort/asort_zh.py index ee36679..7643129 100644 --- a/auto_sort/asort_zh.py +++ b/auto_sort/asort_zh.py @@ -8,6 +8,7 @@ # Version: 0.1 # Description: A very simple python script that can sort items alphabetically. +from __future__ import print_function import os import shutil