From: Bruno Haible Date: Fri, 6 Dec 2024 10:48:36 +0000 (+0100) Subject: examples: hello-python: Make it work with Python 3. X-Git-Tag: v0.23.1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d042a27fbcd0fcaa3a9a6b755bf7d09ded94e19;p=thirdparty%2Fgettext.git examples: hello-python: Make it work with Python 3. * gettext-tools/examples/hello-python/hello.py.in: Add parenthese around print's arguments. --- diff --git a/gettext-tools/examples/hello-python/hello.py.in b/gettext-tools/examples/hello-python/hello.py.in index fffe85563..39f9ed776 100644 --- a/gettext-tools/examples/hello-python/hello.py.in +++ b/gettext-tools/examples/hello-python/hello.py.in @@ -9,6 +9,6 @@ import os gettext.textdomain('hello-python') gettext.bindtextdomain('hello-python', '@localedir@') -print gettext.gettext("Hello, world!") -print gettext.gettext("This program is running as process number %(pid)d.") \ - % { 'pid': os.getpid() } +print(gettext.gettext("Hello, world!")) +print(gettext.gettext("This program is running as process number %(pid)d.") + % { 'pid': os.getpid() })