diff --git a/examples/call_v_from_python/README.md b/examples/call_v_from_python/README.md index 889d00b360..8e955c0065 100644 --- a/examples/call_v_from_python/README.md +++ b/examples/call_v_from_python/README.md @@ -1,5 +1,5 @@ A simple example to show how to call a function written in v from python -Step 1: Compile the v code to a shared library using ``v -shared -prod test.v`` +Step 1: Compile the v code to a shared library using `v -shared test.v` -Step 2: Run the python file using ``python3 test.py`` +Step 2: Run the python file using `python3 test.py` diff --git a/examples/call_v_from_python/test.py b/examples/call_v_from_python/test.py index d2b6069f9a..e85620cca3 100644 --- a/examples/call_v_from_python/test.py +++ b/examples/call_v_from_python/test.py @@ -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