]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: hello-python: Make it work with Python 3.
authorBruno Haible <bruno@clisp.org>
Fri, 6 Dec 2024 10:48:36 +0000 (11:48 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 31 Dec 2024 10:02:27 +0000 (11:02 +0100)
* gettext-tools/examples/hello-python/hello.py.in: Add parenthese around print's
arguments.

gettext-tools/examples/hello-python/hello.py.in

index fffe85563eb6bcb539f88eb005da5b479cb402de..39f9ed7765d86b65101866e8f0eb0a07d65d831c 100644 (file)
@@ -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() })