import os, sys, platform

# 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 disablef 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":
    for path in os.getenv("PATH", "").split(os.pathsep):
        if os.path.exists(path) and path != ".":
            os.add_dll_directory(path)

from .OpenImageIO import *


4074eb9e19eeb0460704c0615f2267c11a7da584
<mask token>

<mask token>
if sys.version_info >= (3, 8) and platform.system() == 'Windows' and os.getenv(
    'OIIO_LOAD_DLLS_FROM_PATH', '1') == '1':
    for path in os.getenv('PATH', '').split(os.pathsep):
        if os.path.exists(path) and path != '.':
            os.add_dll_directory(path)
<mask token>

import os, sys, platform
if sys.version_info >= (3, 8) and platform.system() == 'Windows' and os.getenv(
    'OIIO_LOAD_DLLS_FROM_PATH', '1') == '1':
    for path in os.getenv('PATH', '').split(os.pathsep):
        if os.path.exists(path) and path != '.':
            os.add_dll_directory(path)
from .OpenImageIO import *

import os, sys, platform

# 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 disablef 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":
    for path in os.getenv("PATH", "").split(os.pathsep):
        if os.path.exists(path) and path != ".":
            os.add_dll_directory(path)

from .OpenImageIO import *

