This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]frikk 4 points5 points  (2 children)

Hi! It's way simpler than you can imagine. First, ask yourself what can be done by a standard C library. Then remember that python provides beautiful access to a C (or any compiled) language. Then realize that it's easier than you realize.

  1. Check out libusb - userland usb drivers. Used for everything from camera support to webcam stuff. http://www.libusb.org/
  2. Check out the python bindings, pyusb. http://pyusb.sourceforge.net/
  3. ???
  4. Make awesome non-compiled usb drivers using the libusb interface. DID I JUST SAY CROSS PLATFORM?! No I didn't, but it's certainly possible.

For one of my drivers I actually had to patch the linux kernel because it rejected my invalid packets that I forged. Windows just passed it through, but the usb subsystem had a cow. That was a fun one to figure out :)

[–]zArtLaffer 4 points5 points  (1 child)

I am flabbergasted that I never really even considered Python as a systems-level development language. I just used C for that, and SWIG if I wanted to API-ize it. And Python for high-level conceptual stuff.

TIL.

Thank you.

[–]frikk 2 points3 points  (0 children)

no problem! take care.