python: scripting: Port ntstatus and werror generators to Python 3 compatible form.