s = sha1(random()).hexdigest()

Paul Rubin http
Thu Jan 15 23:46:16 EST 2009


gert <gert.cuykens at gmail.com> writes:
>  s = urandom(10).encode('hex')
>  AttributeError: 'bytes' object has no attribute 'encode'

Oh, Python 3.  It's done some different way, someone else will have to
specify.  I'm still using 2.x.



More information about the Python-list mailing list