Python API

q3py acts as a C extension module to the embedded Python. This allows the Python module to call back into Quake 3 and to configure q3py.


New in version 0.0.1.

Sets the vmMain callable that q3py invokes when being called by Quake 3.

Parameters:callback (callable) – The Python callable to use
Raises:TypeError: if callback is not a callable()
q3py.syscall(num[, args])

New in version 0.0.1.

Invokes a Quake 3 syscall.

  • num (int) – The number of the syscall
  • args (int) – The arguments for the syscall

The result of the syscall

Return type:



New in version 0.0.1.

Contains the version of q3py as a read-only string of the form MAJOR.MINOR.PATCH, e.g. “0.0.1-dirty”.


New in version 0.0.1.

Contains a read-only PyCapsule of q3py’s C API.