From 7f1cc44b0412a24e09b8dc65e6cd1fac01a3c82c Mon Sep 17 00:00:00 2001 From: Charles WANG Date: Mon, 10 Jan 2022 15:11:54 +0800 Subject: [PATCH] examples: detect windows and use correct file in the call_v_from_python example (#13114) --- examples/call_v_from_python/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/call_v_from_python/test.py b/examples/call_v_from_python/test.py index 33b9ba7327..9cebed3552 100644 --- a/examples/call_v_from_python/test.py +++ b/examples/call_v_from_python/test.py @@ -1,4 +1,8 @@ from ctypes import * +import os + so_file="./test.so" +if os.name=="nt": + so_file="./test.dll" my_functions = CDLL(so_file) print(my_functions.square(10))