1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: detect windows and use correct file in the call_v_from_python example (#13114)

This commit is contained in:
Charles WANG 2022-01-10 15:11:54 +08:00 committed by GitHub
parent 5e85d4cb39
commit 7f1cc44b04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))