:py:mod:`flow.record.utils` =========================== .. py:module:: flow.record.utils Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: flow.record.utils.EventHandler Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: flow.record.utils.is_stdout flow.record.utils.to_bytes flow.record.utils.to_str flow.record.utils.to_native_str flow.record.utils.to_base64 flow.record.utils.catch_sigpipe .. py:function:: is_stdout(fp) .. py:function:: to_bytes(value) Convert a value to a byte string. .. py:function:: to_str(value) Convert a value to a unicode string. .. py:function:: to_native_str(value) Convert a value to a native `str`. .. py:function:: to_base64(value) Convert a value to a base64 string. .. py:function:: catch_sigpipe(func) Catches KeyboardInterrupt and BrokenPipeError (OSError 22 on Windows). .. py:class:: EventHandler .. py:method:: add_handler(callback) .. py:method:: remove_handler(callback) .. py:method:: __call__(*args, **kwargs)