accessories¶
Accessory functions.
-
encoding_from_lang
(lang)[source]¶ Parse encoding from LANG environment value.
Example:
>>> encoding_from_lang('en_US.UTF-8@misc') 'UTF-8'
-
eightbits
(number)[source]¶ Binary representation of
number
padded to 8 bits.Example:
>>> eightbits(ord('a')) '0b01100001'
-
make_logger
(name, loglevel='info', logfile=None, logfmt='%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(message)s')[source]¶ Create and return simple logger for given arguments.