7if sys.platform ==
"win32":
8 """Ensure that ESI libraries are in the dll path on Windows. Necessary to
9 call when users build against the esiaccel-provided prebuilt CMake/prebuilt
10 libraries, before they are loaded via. python.
12 from .utils
import get_dll_dir
13 os.add_dll_directory(str(get_dll_dir()))
15from .accelerator
import AcceleratorConnection, Context, LogLevel
17from .esiCppAccel
import (AppID, Type, BundleType, ChannelType, ArrayType,
18 StructType, BitsType, UIntType, SIntType, ListType,
22 "AcceleratorConnection",
"AppID",
"Context",
"LogLevel",
"Type",
23 "BundleType",
"ChannelType",
"ArrayType",
"StructType",
"BitsType",
24 "UIntType",
"SIntType",
"ListType",
"WindowType"
28def connect(platform: str, connection_str: str) ->
"AcceleratorConnection":
29 """Connect to an accelerator using the specified platform and connection
31 ctxt = Context.default()
33 ctxt.cpp_ctxt.connect(platform, connection_str))
"AcceleratorConnection" connect(str platform, str connection_str)