Package portage :: Module localization
[hide private]

Module localization

source code

Functions [hide private]
 
_(mystr)
Always returns unicode, regardless of the input type.
source code
 
localization_example() source code
 
localized_size(num_bytes)
Return pretty localized size string for num_bytes size (given in bytes).
source code
Variables [hide private]
  __package__ = 'portage'

Imports: locale, math, _encodings, _unicode_decode


Function Details [hide private]

_(mystr)

source code 

Always returns unicode, regardless of the input type. This is helpful for avoiding UnicodeDecodeError from __str__() with Python 2, by ensuring that string format operations invoke __unicode__() instead of __str__().

localized_size(num_bytes)

source code 

Return pretty localized size string for num_bytes size (given in bytes). The output will be in kibibytes.