For more detail on the concepts and motivation behind rsyscall, read the [[file:docs/conceptual.org][conceptual introduction]].
Note that the rsyscall Python API uses some recent Python 3 features: async/await and type annotations. If you haven't seen those before, skim the [[file:docs/background.org][background tutorial]] first.
But, if you want to try it, you can do so with Nix:
git clone https://github.com/catern/rsyscall cd rsyscall/python nix-shell python
Or you can build it by hand in a virtual environment:
git clone https://github.com/catern/rsyscall cd rsyscall python3 -m venv venv . venv/bin/activate pip install -U pip
cd c autoreconf -fvi ./configure --prefix=$PWD/../venv make install cd .. export LD_LIBRARY_PATH=$PWD/venv/lib export PKG_CONFIG_PATH=$PWD/venv/lib/pkgconfig
pip install -e python/ python
$ pip install ipython $ ipython In [1]: %autoawait trio
In [2]: import rsyscall
In [3]: t = await rsyscall.local_process.fork()
In [4]: await t.stdout.write(await t.ptr("Hello world!\n")) Hello world!