v/examples/call_v_from_python
2023-11-15 16:16:01 +11:00
..
README.md examples: mention -d no_backtrace in examples/call_v_from_python/README.md 2022-11-01 18:16:30 +02:00
test.py examples: improve the examples/call_v_from_python with Python showing the result of the calculation done on the V side 2022-10-16 22:48:00 +03:00
test.v all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00

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 -d no_backtrace -shared test.v

Step 2: Run the python file using python3 test.py

Note: you do not need -d no_backtrace if you use gcc or clang .