examples: detect windows and use correct file in the call_v_from_python example (#13114)
parent
5e85d4cb39
commit
7f1cc44b04
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue