I am using Python 2.7 with pyobjc on Lion and NSNotification center to monitor any inserted USB volumes. This works fine.
I've also got some ideas how to get a device's serial number, but these involve just parsing all the USB devices. I'd like to specifically query the inserted device only (the one creating the notification) rather than checking the entire USB device list.
How can this be accomplished? The NSNotification
object passed to my handler function doesn't have that kind of information and I've not been able to find any information on doing the above with the information provided by the NSNotification
object.
I've tried DBus (as I do on Linux) but I've not had much luck getting it to work reliably on OSX.