Getting USB volume serial number from inserted device on OSX

Sven svenito at gmail.com
Fri Apr 5 09:23:21 EDT 2013


On 5 April 2013 06:20, Tim Roberts <timr at probo.com> wrote:

> John Nagle <nagle at animats.com> wrote:
> >
> >   That would be useful to have as a portable function for all USB
> >devices.  Serial port devices are particularly annoying, because their
> >port number is somewhat random when there's more than one, and changes
> >on hot-plugging.
>
> There is no portable solution.  Every operating system handles this kind of
> this very differently.  Remember, the operating system abstractions are all
> designed to hide this from you.  When you open a serial port or an audio
> device or use a file system, you aren't supposed to KNOW that there is a
> USB device behind it
>

Indeed. Which means I have a working solution under Linux, but I am
struggling to find one under OS  X.

Looks like I might have to resort to just parsing the USB tree until I find
the device that was inserted.

-- 
./Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130405/b91f31a8/attachment.html>


More information about the Python-list mailing list