Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with script error
#11
Just thought I would post the fix here:

from string import join
from array import array
import sha, base64i
from time import time

# This fix https://mail.python.org/pipermail/python-list/2010-January/563791.html
# Place the 6 lines of code below after the imports then replace every occurrence of "L" with unit32 in the py3 code
for typecode in 'IL':
     if len(array(typecode, [0]).tostring()) == 4:
          uint32 = typecode
          break
     else:
         raise RuntimeError("Neither 'I' nor 'L' are unsigned 32-bit integers.")

class CryptError(Exception): pass
def _hash(str): return sha.new(str).digest()

# rest of py3 code
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020