diff --git a/bindings/python/example_scripts/account_analysis.py b/bindings/python/example_scripts/account_analysis.py index 87e1dfe7b7..0326941575 100644 --- a/bindings/python/example_scripts/account_analysis.py +++ b/bindings/python/example_scripts/account_analysis.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # account_analysis.py -- Output all the credits and debits on an account # diff --git a/bindings/python/example_scripts/change_tax_code.py b/bindings/python/example_scripts/change_tax_code.py index 628b2f31ff..56aab31834 100644 --- a/bindings/python/example_scripts/change_tax_code.py +++ b/bindings/python/example_scripts/change_tax_code.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ## @file # @brief Output all the credits and debits on an account diff --git a/bindings/python/example_scripts/gncinvoicefkt.py b/bindings/python/example_scripts/gncinvoicefkt.py index ef778b4370..8caaa57e4b 100644 --- a/bindings/python/example_scripts/gncinvoicefkt.py +++ b/bindings/python/example_scripts/gncinvoicefkt.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- ##@file diff --git a/bindings/python/example_scripts/latex_invoices.py b/bindings/python/example_scripts/latex_invoices.py index 4c6c1d45fb..76d1c510e4 100644 --- a/bindings/python/example_scripts/latex_invoices.py +++ b/bindings/python/example_scripts/latex_invoices.py @@ -179,7 +179,7 @@ def main(argv=None): try: opts, args = getopt.getopt(argv[1:], "fhiln:po:", ["help"]) - except getopt.error, msg: + except getopt.error as msg: raise Usage(msg) for opt in opts: @@ -207,12 +207,12 @@ def main(argv=None): if len(args)==0: raise Usage("No input given !") input_url = args[0] - except Usage, err: + except Usage as err: if err.msg == "Help:": retcode=0 else: - print(>>sys.stderr, "Error:",err.msg) - print(>>sys.stderr, "for help use --help") + print("Error:", err.msg, file=sys.stderr) + print("for help use --help", file=sys.stderr) retcode=2 print("Generate a LaTeX invoice or print out all invoices.") diff --git a/bindings/python/example_scripts/test_imbalance_transaction.py b/bindings/python/example_scripts/test_imbalance_transaction.py index d22072867d..08c7cb7212 100644 --- a/bindings/python/example_scripts/test_imbalance_transaction.py +++ b/bindings/python/example_scripts/test_imbalance_transaction.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # test_imbalance_transaction.py -- Test the transaction imbalace viewing # mechanisms