Hi Brandon and Lion,
This does sound odd for language with garbage collection. On Google [python memory leak “range(len”] there are apparent reports of memory leaks with code that contains “range(len(”, but after a quick look I cannot see if these may relate to the current problem. Maybe related to Windows???
What about changing:
for i in range(len(bytes)):
to
blen = len(bytes)
for i in range(blen):
just a wild guess…
Anthony