diff --git a/src/python/__init__.py b/src/python/__init__.py index f3c345ec13..72ac6cac8a 100644 --- a/src/python/__init__.py +++ b/src/python/__init__.py @@ -7,8 +7,8 @@ # This works around the python 3.8 change to stop loading DLLs from PATH on Windows. # We reproduce the old behaviour by manually tokenizing PATH, checking that the directories exist and are not ".", # then add them to the DLL load path. -# This behviour can be disabled by setting the environment variable "OIIO_LOAD_DLLS_FROM_PATH" to "0" -if sys.version_info >= (3, 8) and platform.system() == "Windows" and os.getenv("OIIO_LOAD_DLLS_FROM_PATH", "1") == "1": +# This behviour can be enabled by setting the environment variable "OIIO_PYTHON_LOAD_DLLS_FROM_PATH" to "1" +if sys.version_info >= (3, 8) and platform.system() == "Windows" and os.getenv("OIIO_PYTHON_LOAD_DLLS_FROM_PATH", "0") == "1": for path in os.getenv("PATH", "").split(os.pathsep): if os.path.exists(path) and path != ".": os.add_dll_directory(path)