vpelletier / python-functionfs

Pythonic API for linux's functionfs
GNU General Public License v3.0
40 stars 13 forks source link

Python 3 compatibility #4

Closed ali1234 closed 6 years ago

ali1234 commented 6 years ago

Some changes (range and dict stuff) may be slightly less efficient. In practice this should make no difference as the lists involved are not large.

Fixes #3

vpelletier commented 6 years ago

Overall most of the changes look good. For the {x,}range and {iter,}{items,values} changes, I tend to prefer to invoke 2to3 during setup.py as these are sadly much faster on python2. But I will have to check whether they are in a critical path (sorry, long day today).

ali1234 commented 6 years ago

Like that? (Beware, not tested.)

ali1234 commented 6 years ago

BTW this is why I need py3...

https://github.com/ali1234/pymtpd

vpelletier commented 6 years ago

Released as 0.3, thanks !

I must say I wrote this as I intended to implement a CCID class device about a year ago, but had so much to do (hardware, kernel patches, this, a i2c display driver, and the CCID spec) it exhausted my interest before I could get back to implementing the actual function...