Author Topic: PyUSB 1.0 vs 0.4  (Read 3965 times)

RussNelson

  • Newbie
  • *
  • Posts: 23
PyUSB 1.0 vs 0.4
« on: January 14, 2013, 04:02:14 pm »
The Digispark USB Python code relies on PyUSB 1.0, yet the latest and greatest PyUSB on Ubuntu is 0.4. Has anybody ported the code to the current release?

Rule #1 of Linux development: if the current stable Ubuntu doesn't come with it as a package, DON'T USE IT.
« Last Edit: January 14, 2013, 04:02:14 pm by RussNelson »

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
PyUSB 1.0 vs 0.4
« Reply #1 on: January 14, 2013, 04:36:45 pm »
libusb projects are difficult, as there are two major versions with incompatible APIs - 0.1.x and 1.x. I\'m not sure of python, but I expect it might also have a different API on versions earlier than 1.0. Regardless, I\'ve installed libusb 1.x and been using it with ruby\'s libusb gem on a raspbian (debian) machine without any issue. There is also a libusb-compat package which simulates the older API for older software compatibility.

RussNelson

  • Newbie
  • *
  • Posts: 23
PyUSB 1.0 vs 0.4
« Reply #2 on: January 15, 2013, 07:21:37 am »
Yes, it does have a different API, no doubt exposing the differences between libusb versions.

RussNelson

  • Newbie
  • *
  • Posts: 23
PyUSB 1.0 vs 0.4
« Reply #3 on: January 15, 2013, 07:39:53 am »
Since I don\'t know enough (or much) about raw USB access, I decided to remove python-usb and install the current PyUSB 1.0 code.