wand.compat
— Compatibility layer¶
This module provides several encoding-related utilities.
- wand.compat.encode_filename(filename)¶
If
filename
is atext_type
, encode it tobytes
according to filesystem’s default encoding.Changed in version 0.5.3: Added support for PEP-519 https://github.com/emcconville/wand/pull/339
- wand.compat.to_bytes(value, string_pattern='{0}')¶
Short-cut method to allow mixed value types to be converted to bytes.
- Parameters:
New in version 0.6.4.