Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42787
| From | John Nagle <nagle@animats.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Getting USB volume serial number from inserted device on OSX |
| Date | 2013-04-04 18:58 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <kjlavt$v8j$1@dont-email.me> (permalink) |
| References | <mailman.25.1364941140.3114.python-list@python.org> |
On 4/2/2013 3:18 PM, Sven wrote:
> Hello,
>
> 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 ('system_profiler SPUSBDataType'
> command). However I'd like to specifically query the inserted device only
> (the one creating the notification) rather than checking the entire USB
> device list. The latter seems a little inefficient and "wrong".
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.
John Nagle
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Getting USB volume serial number from inserted device on OSX Sven <svenito@gmail.com> - 2013-04-02 23:18 +0100
Re: Getting USB volume serial number from inserted device on OSX John Nagle <nagle@animats.com> - 2013-04-04 18:58 -0700
Re: Getting USB volume serial number from inserted device on OSX Tim Roberts <timr@probo.com> - 2013-04-04 22:20 -0700
Re: Getting USB volume serial number from inserted device on OSX Sven <svenito@gmail.com> - 2013-04-05 14:23 +0100
csiph-web