Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Is the python xlib library written in python?


Asked by Briggs Floyd on Dec 10, 2021 FAQ



It is written entirely in Python, in contrast to earlier X libraries for Python (the ancient X extension and the newer plxlib) which were interfaces to the C Xlib. This is possible to do since X client programs communicate with the X server via the X protocol.
In this manner,
The Python X Library is intended to be a fully functional X client library for Python programs. It is written entirely in Python, in contrast to earlier X libraries for Python (the ancient X extension and the newer plxlib) which were interfaces to the C Xlib.
Indeed, The C Xlib is merely an interface to this protocol, providing functions suitable for a C environment. There are three advantages of implementing a pure Python library: Integration: The library can make use of the wonderful object system in Python, providing an easy-to-use class hierarchy.
Subsequently,
Python Xlib is now maintained at Github, where Python 3 support is being added and the code has been relicensed to LGPL. For code access, issue reporting etc head over there: https://github.com/python-xlib/python-xlib
Thereof,
Windows Mac Linux. The Python X Library is a complete X11R6 client-side implementation, written in pure Python. It can be used to write low-levelish X Windows client applications in Python.