[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.5.4 Python

RPMs
python

File extension
py

String syntax
'abc', u'abc', r'abc', ur'abc',
"abc", u"abc", r"abc", ur"abc",
"'abc"', u"'abc"', r"'abc"', ur"'abc"',
"""abc""", u"""abc""", r"""abc""", ur"""abc"""

gettext shorthand
_('abc') etc.

gettext/ngettext functions
gettext.gettext, gettext.dgettext, also ugettext

textdomain
gettext.textdomain function, or gettext.install(domain) function

bindtextdomain
gettext.bindtextdomain function, or gettext.install(domain,localedir) function

setlocale
not used by the gettext emulation

Prerequisite
import gettext

Use or emulate GNU gettext
emulate. Bug: uses only the first found .mo file, not all of them

Extractor
xgettext

Formatting with positions
'...%(ident)d...' % { 'ident': value }

Portability
fully portable

po-mode marking
---



This document was generated on May 6, 2002 using texi2html