To be specific,
PyPi package rarfile has _check_unrar_tool() function that runs on import. I don't want it run while importing, because it throws permission error in certain boxes.
I cant modify the package at my place due to certain restrictions.
So, as in this scenario, is it possible to ignore _check_unrar_tool() call and import successfully.
Thanks in advance.
Technically, the rarfile package, more specifically the _check_unrar_tool() just expects a return code of 0 from the unrar command.
If you can somehow check if the unrar command works before importing the package, you can substitute it for something else that returns 0 and you can get away without messing with the package.
Is it possible to avoid execution of check function if available in module while importing it