Prepare the Python examples
Python modules use the same services and Shell commands as C++ modules. First build the native Python SDK; after that, write your module logic in .py files.
This guide uses Windows, PowerShell, and 64-bit CPython 3.13 with the GIL enabled. You still need the C++ tools from the build guide. Use the MSVC x64 developer environment, with cl, nmake, cmake and ninja available.
1. Get the example project
Section titled “1. Get the example project”Run these commands where you want to keep the project. If you already have open-vinc-examples, enter that directory and skip cloning it.
git clone --branch main https://github.com/JayTDawgzone1994/open-vinc-examples.gitcd open-vinc-examplesgit submodule update --init framework/open-vincgit -C framework/open-vinc submodule update --init --recursivenpm ci --prefix framework/open-vinc/src/vinc/ui/webRun all remaining commands from this repository root. Avoid spaces in the Windows project path for this version’s Tcl build.
2. Create a Python environment
Section titled “2. Create a Python environment”With 64-bit CPython 3.13 installed:
py -3.13 -m venv .venvThis creates a project environment in .venv/. You can use its Python executable directly without activating it. Use a CPython installation compatible with MSVC; a MinGW Python installation cannot build this extension.
3. Build the SDK
Section titled “3. Build the SDK”cmake -S python -B build/python -G Ninja -DCMAKE_BUILD_TYPE=Releasecmake --build build/pythonThe first build compiles the framework and its Python extension. There is no separate pip install vinc step.
The example selects the project’s .venv through python/vinc.conf.in and copies these ten modules beside the executable:
build/python/├── Vinc.exe├── python/vinc/ # Generated SDK└── data/module/ ├── helloModule/helloModule.py ├── counterPublisher/counterPublisher.py ├── counterSubscriber/counterSubscriber.py ├── parameterPublisher/parameterPublisher.py ├── rpcPublisher/rpcPublisher.py ├── rpcSubscriber/rpcSubscriber.py ├── logPublisher/logPublisher.py ├── logSubscriber/logSubscriber.py ├── sensorPublisher/sensorPublisher.py └── sensorSubscriber/sensorSubscriber.py4. Open Vinc Shell
Section titled “4. Open Vinc Shell”.\build\python\Vinc.exe --python .\.venv\Scripts\python.exe--python selects the same environment used for the build. Keep this option in the Python examples so Vinc does not accidentally select another Python from PATH.
Once you see VINC ready, enter exit to close it. Starting a module is the next lesson.
Use another Python environment
The example defaults to the project’s .venv. To use another environment, configure with -DTUTORIAL_PYTHON_EXECUTABLE=absolute/path/to/python and point the runtime --python option to that same compatible environment.
The Python minor version, 64-bit platform and GIL configuration must match the binding. See the Python SDK for its requirements.
Next step
Section titled “Next step”Open Your first running module and select the Python tab. The language selection carries over to the next lessons.
After editing a module under python/modules/, run cmake --build build/python to copy the changes, then restart Vinc. Changing only Python code does not require recompiling the SDK. Changing a .msg definition does.