[Feature Request] Load custom filters from Python modules
michalismeng opened this issue · comments
Michalis Mengisoglou commented
The current implementation allows loading custom filters from Python files by using the --filters
argument.
My problem is I have compiled Python files, i.e Python bytecode (.pyc files) and passing them to --filters
fails with the following error:
ValueError: source code string cannot contain null bytes
I understand the main reason for the above behavior is using Python's imp.load_source
function, which can't read bytecode:
Lines 72 to 74 in 26a67e9
A solution to the above would be to introduce a new argument, e.g --filters-modules MODULE
, which will accept Python modules and load them using importlib.import_module
.