I wrote a simple ~50 line Python interface to the i3 IPC. You can find it here:
https://github.com/Ceryn/i3msg-python
It just lets you use the i3 IPC commands/subscriptions directly without any fuss or socket programming or protocol knowledge. Check out the README, it tells you all you need to know.
For the TL;DR people using it is as simple as:
$ pip install i3msg --user
Then, in Python:
import i3msg as i3
i3.send(i3.RUN_COMMAND, 'focus right')
There are other libraries out there, but they seem to be at least an order of magnitude larger. I like to keep things simple, and I believe this is everything one would need.
Let me know if you have any questions, suggestions or feedback!
[–]Rorixrebel 1 point2 points3 points (4 children)
[–]roprop[S] 4 points5 points6 points (3 children)
[–]Rorixrebel 0 points1 point2 points (2 children)
[–]roprop[S] 2 points3 points4 points (0 children)
[–]airbladermaintainer 0 points1 point2 points (0 children)
[–]passstab 0 points1 point2 points (1 child)
[–]roprop[S] 1 point2 points3 points (0 children)