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:
parent
5e85d4cb39
commit
7f1cc44b04
@ -1,4 +1,8 @@
|
|||||||
from ctypes import *
|
from ctypes import *
|
||||||
|
import os
|
||||||
|
|
||||||
so_file="./test.so"
|
so_file="./test.so"
|
||||||
|
if os.name=="nt":
|
||||||
|
so_file="./test.dll"
|
||||||
my_functions = CDLL(so_file)
|
my_functions = CDLL(so_file)
|
||||||
print(my_functions.square(10))
|
print(my_functions.square(10))
|
||||||
|
Loading…
Reference in New Issue
Block a user