Detecting new removable drives in Linux

Stefan Behnel stefan_ml at
Mon Mar 1 13:46:22 CET 2010

Bart Smeets, 01.03.2010 10:48:
> I'm trying to write a script which detects when a new removable drive is
> connected to the computer. On #python I was advised to use the
> dbus-bindings. However the documentation on this is limited. Does anyone
> know of an example of how I can detect new removable drives?

You could execute a script from HAL, e.g. using halevt, and let the script
communicate with your program.


More information about the Python-list mailing list