mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +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:
@ -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
|
||||
|
Reference in New Issue
Block a user