Getting USB volume serial number from inserted device on OSX

Tim Roberts timr at probo.com
Fri Apr 5 01:20:08 EDT 2013


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.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list