[Pyobjc-dev] Wrapping GetLocationID from IOUSBLib
Brought to you by:
ronaldoussoren
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-22 21:26:42
|
I'm new to PyObjC (and Object C in general). I have a python application that accesses a USB device, and I want to display the LocationID (like System Profiler and ioreg does). The LocationID seems to be OS X specific and not part of the standard USB protocol and thus not part of PyUSB. So assuming OS X does not provide a python interface to IOUSBLib (please let me know if it does), then I have to find a way to access it from Python. It would seem that PyObjC would be an appropriate method -- yes/no ??? The header file IOUSBLib.h contains the function GetLocationID. IOReturn (*GetLocationID)(void *self, UInt32 *locationID); Am I able to wrap this one function (or is it a method ?) easily with PyObjC ?? If it is easy, could someone provide some skeleton code for me to work/play with. If not so easy, could someone outline things that need to done and point me to some appropriate doucmentation. Many thanks, Brendan (pyobjc newbie) :) |