From: <pyu...@li...> - 2010-02-02 15:41:14
Attachments:
pyusb-getString.patch
|
Hi, This is a patch for pyusb 0.4.1. Currently, getString(index, len, -1) returns a plain string, but when providing a langid like in getString(index, len, 0x409) it returns the raw string descriptor which then has to be converted into a plain string. The patch makes the latter case return a plain string like in the former case. The conversion is similar to the one done in the libusb-0.1 usb_get_string_simple() function. I tried to check how this is done in pyusb 1.x, but AFAICS the getString() method is not implemented there yet. Tormod |
From: <pyu...@li...> - 2010-02-03 00:47:57
|
Hello Tormod, Would you mind making the patch for latest svn code? Thank you very much for you contribution. Wander 2010/2/3 <pyu...@li...>: > Hi, > This is a patch for pyusb 0.4.1. > > Currently, getString(index, len, -1) returns a plain string, but when > providing a langid like in getString(index, len, 0x409) it returns the > raw string descriptor which then has to be converted into a plain > string. The patch makes the latter case return a plain string like in > the former case. The conversion is similar to the one done in the > libusb-0.1 usb_get_string_simple() function. > > I tried to check how this is done in pyusb 1.x, but AFAICS the > getString() method is not implemented there yet. > > Tormod > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: <pyu...@li...> - 2010-02-03 10:42:27
Attachments:
pyusb-getString.patch
|
Hi Wander, I have refreshed the patch so it applies against svn 0.x branch. Cheers, Tormod On Wed, Feb 3, 2010 at 1:47 AM, <pyu...@li...> wrote: > Hello Tormod, > > Would you mind making the patch for latest svn code? > Thank you very much for you contribution. > > Wander > > 2010/2/3 <pyu...@li...>: >> Hi, >> This is a patch for pyusb 0.4.1. >> >> Currently, getString(index, len, -1) returns a plain string, but when >> providing a langid like in getString(index, len, 0x409) it returns the >> raw string descriptor which then has to be converted into a plain >> string. The patch makes the latter case return a plain string like in >> the former case. The conversion is similar to the one done in the >> libusb-0.1 usb_get_string_simple() function. >> >> I tried to check how this is done in pyusb 1.x, but AFAICS the >> getString() method is not implemented there yet. >> >> Tormod >> |
From: Wander L. <wan...@gm...> - 2010-02-04 03:13:16
|
Hi, The patch was applied at rev 43. Wander 2010/2/3 <pyu...@li...>: > Hi Wander, > > I have refreshed the patch so it applies against svn 0.x branch. > > Cheers, Tormod > > > On Wed, Feb 3, 2010 at 1:47 AM, <pyu...@li...> wrote: >> Hello Tormod, >> >> Would you mind making the patch for latest svn code? >> Thank you very much for you contribution. >> >> Wander >> >> 2010/2/3 <pyu...@li...>: >>> Hi, >>> This is a patch for pyusb 0.4.1. >>> >>> Currently, getString(index, len, -1) returns a plain string, but when >>> providing a langid like in getString(index, len, 0x409) it returns the >>> raw string descriptor which then has to be converted into a plain >>> string. The patch makes the latter case return a plain string like in >>> the former case. The conversion is similar to the one done in the >>> libusb-0.1 usb_get_string_simple() function. >>> >>> I tried to check how this is done in pyusb 1.x, but AFAICS the >>> getString() method is not implemented there yet. >>> >>> Tormod >>> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |