dressel / pyhackrf

A Python wrapper for libhackrf
69 stars 18 forks source link

xrange does not exist in python3 #3

Open Learath opened 4 years ago

Learath commented 4 years ago

File "libhackrf.py", line 525, in get_serial_no for i in xrange(0,4): NameError: name 'xrange' is not defined

This is an easy fix - for python3 the 'range' function is identical.

Digging in a bit further, it looks like the hex function also differs very slightly between python2 and python3, with an L appended in python2, which is removed by the -1 in sn_str += hex(sni)[2:-1]

gogo2464 commented 1 year ago

absolutely. ASsign me to this issue please!