xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-python/hello.py.in (revision 53b02e147d4ed531c0d2a5ca9b3e8026ba3e99b5)
1# Example for use of GNU gettext.
2# Copyright (C) 2003 Free Software Foundation, Inc.
3# This file is in the public domain.
4#
5# Source code of the Python program.
6
7import gettext
8import os
9
10gettext.textdomain('hello-python')
11gettext.bindtextdomain('hello-python', '@localedir@')
12
13print gettext.gettext("Hello, world!")
14print gettext.gettext("This program is running as process number %(pid)d.") \
15      % { 'pid': os.getpid() }
16