[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Detecting new removable drives in Linux

marduk

3/1/2010 12:10:00 PM

On Mon, 2010-03-01 at 10:48 +0100, Bart Smeets wrote:
> Hello,
>
>
> 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?

The documentation does suck and, at least for the python bindings, is
horribly outdated.

Also, the python bindings for dbus are not as "pythonic" as they could
be. I was working on a python/dbus program a while back and basically
had to resort to looking at the source of a program that did, or almost
did, what I wanted and using that as an example.

You may even want to look at C sources as I don't think the python
bindings are that much different.

HTH,
-a