The docs on the git repository for Anki give the suggestion of generating Python documentation using:
./ninja python:sphinx && open out/python/sphinx/html/py-modindex.html
I imagine this is only a Linux thing, trying to execute it on Windows (switching for tools\ninja, of course) just causes the following errors:
Traceback (most recent call last):
File “C:\Users\mahdi\Documents\anki\python\sphinx\build.py”, line 7, in
subprocess.run([“out/pyenv/bin/sphinx-apidoc”, “-o”, “out/python/sphinx”, “pylib”, “qt”], check=True)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\mahdi\AppData\Roaming\uv\python\cpython-3.13.5-windows-x86_64-none\Lib\subprocess.py”, line 554, in run
with Popen(*popenargs, **kwargs) as process:
~~~~~^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\mahdi\AppData\Roaming\uv\python\cpython-3.13.5-windows-x86_64-none\Lib\subprocess.py”, line 1039, in init
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
…<5 lines>…
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\mahdi\AppData\Roaming\uv\python\cpython-3.13.5-windows-x86_64-none\Lib\subprocess.py”, line 1554, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
# no special security
^^^^^^^^^^^^^^^^^^^^^
…<4 lines>…
cwd,
^^^^
startupinfo)
^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
Failed to run (1): out\pyenv\scripts\python.exe python/sphinx/build.py
And after that even building the program doesn’t work anymore