mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
examples: improve the examples/call_v_from_python with Python showing the result of the calculation done on the V side
This commit is contained in:
parent
409a4f33a1
commit
7302d8c4a8
2 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@ so_file="./test.so"
|
|||
if os.name=="nt":
|
||||
so_file="./test.dll"
|
||||
lib = CDLL(so_file)
|
||||
print("lib.square(10) result is", lib.square(10))
|
||||
assert lib.square(10) == 100, "Cannot validate V square()."
|
||||
|
||||
lib.sqrt_of_sum_of_squares.restype = c_double
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue