wand.compat — Compatibility layer¶
This module provides several encoding-related utilities.
- wand.compat.encode_filename(filename)¶
If
filenameis atext_type, encode it tobytesaccording 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:
Added in version 0.6.4.