Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between python-xlib, python3-xlib, pyxlib and xlib in Python3?

I individually installed (and posterior uninstalled):

  • python-xlib
  • python3-xlib
  • pyxlib
  • xlib

via pip (un)install and could execute

from Xlib import X, display, Xutil
from Xlib.ext import randr
d = display.Display()

with all of them with Python 3.8.10. – What is the difference between them? Pip definitively downloads and installs different packages with different sizes.

like image 864
Robert Siemer Avatar asked Sep 26 '26 01:09

Robert Siemer


2 Answers

Use only

  • python-xlib

The other three

  • python3-xlib
  • pyxlib
  • xlib

are (seemingly) from two individuals (one holds pyxlib and xlib the other holds python3-xlib) with either broken homepage links or pointing to python-xlib. Nothing in python-xlib points to pyxlib or python3-xlib.

In the best case these are just outdated snapshots of python-xlib with questionable changes turned into packages.

like image 93
Robert Siemer Avatar answered Sep 27 '26 16:09

Robert Siemer


Here's what I've found after a little digging around.

Short answer:
Use python-xlib as it's currently maintained (at the time of writing) whereas the others appear to be abandoned projects.


A bit of context:

  • python-xlib: Appears to be the legitimate project. 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. Ref

  • xlib: Dubious (non-maintained) fork, potentially malicious. Xlib (also known as libX11) is an X Window System protocol client library written in the C programming language, Ref. However, the Python version appears to be no longer maintained.

  • pyxlib: Dubious (non-maintained) fork, potentially malicious. Appears to be no longer maintained.

  • python3-xlib: Appears to be no longer maintained. GitHub repository now missing.


Edits:

  • 2024-05-29: Incorporated helpful comments from @mitchmcmabers
like image 26
S3DEV Avatar answered Sep 27 '26 15:09

S3DEV



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!