Questions tagged [pyudev]

is a LGPL licensed, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux.

Use this tag if your question is related to pyudev python library.

According to pyudev 0.17 documentation

pyudev is a LGPL licenced, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux.

Almost the complete libudev functionality is exposed. You can:

  • Enumerate devices, filtered by specific criteria (pyudev.Context)
  • Query device information, properties and attributes,
  • Monitor devices, both synchronously and asynchronously with background threads, or within the event loops of Qt (pyudev.pyqt4, pyudev.pyside), glib (pyudev.glib) and wxPython (pyudev.wx).
36 questions
0
votes
0 answers

Pyudev's ObserverMonitor locks up GIL when monkey patched

Whenever I use eventlet's monkey patching (necessary for Flask-SocketIO) the disk_monitor_thread() prevents other threads from firing. Eventlet and monkey patching is a must for me. Is there a way to get pyudev's MonitorObserver to place nice and…
Kenny Powers
  • 1,254
  • 2
  • 15
  • 25
0
votes
1 answer

Pyudev - calls function twice

I have a problem with pyudev library usage. I want to have a program which detects USB plug in and prints something to console. Here's the code i have: import glib import os import sys from pyudev import Context, Monitor from pyudev.glib import…
0
votes
1 answer

udev doesn't always report 'features' on bluetooth devices

I have been using pyudev to look for bluetooth devices and then used the "features" attribute to determine if the device has LE support. However, just recently in the latest version of Ubuntu, udev no longer reports anything for "features". Here's…
Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
0
votes
1 answer

Getting hard disk serial number (USB stick / ATA based) with pyudev

Been working on the below sample code to retrieve the connected HDD detail using pyudev. Devices that I am trying to probe: regular sata hard disk USB to SATA converter USB Sticks With the below script, I have been able to retrieve the USB sticks…
Ragav
  • 942
  • 4
  • 19
  • 37
0
votes
1 answer

Pyudev : KeyError raised even though property exists

I am trying to monitor and filter usb mass storage devices using pyudev in python. In the given code devices are being filtered out if their ID_FS_USAGE property is None : import gtk from pyudev import Context,Monitor from pyudev.glib import…
Flame of udun
  • 2,136
  • 7
  • 35
  • 79
0
votes
1 answer

TypeError : Method takes exactly 2 arguments (3 given)

Trying to make a program to monitor usb drive connections using pyudev. Here is the code: def __init__(self): self.window = gtk.Window() self.window.set_default_size(300, 300) self.vbox= gtk.VBox(False, 5) label = gtk.Label("Please…
Flame of udun
  • 2,136
  • 7
  • 35
  • 79
1 2
3