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