We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente9cbb87 commit58bd58cCopy full SHA for 58bd58c
pythonnet/__init__.py
@@ -16,7 +16,7 @@ def set_runtime(runtime):
16
17
18
defset_default_runtime()->None:
19
-ifsys.platform=='win32':
+ifsys.platform=="win32":
20
set_runtime(clr_loader.get_netfx())
21
else:
22
set_runtime(clr_loader.get_mono())
@@ -36,22 +36,23 @@ def load():
36
set_default_runtime()
37
38
dll_path=join(dirname(__file__),"runtime","Python.Runtime.dll")
39
-
+
40
_LOADER_ASSEMBLY=_RUNTIME.get_assembly(dll_path)
41
42
func=_LOADER_ASSEMBLY["Python.Runtime.Loader.Initialize"]
43
-iffunc(''.encode("utf8"))!=0:
+iffunc(b"")!=0:
44
raiseRuntimeError("Failed to initialize Python.Runtime.dll")
45
46
importatexit
47
48
atexit.register(unload)
49
50
51
defunload():
52
global_RUNTIME
53
if_LOADER_ASSEMBLYisnotNone:
54
func=_LOADER_ASSEMBLY["Python.Runtime.Loader.Shutdown"]
-iffunc(b"")!=0:
55
+iffunc(b"full_shutdown")!=0:
56
raiseRuntimeError("Failed to call Python.NET shutdown")
57
58
if_RUNTIMEisnotNone: