Python3 compatibility (import and check_output conversion)