On Wed, 11 Oct 2006, Tim Peters wrote:
> If you want /true/ randomness, you can buy a certified hardware random
> number generator, based on non-deterministic physical processes (like
> timing radioactive decay, or measuring thermal noise).
Why buy when you can borrow?:
def truerandom(n):
"""
truerandom(n) --> str
Return a string of n truly random bytes.
see:
http://www.fourmilab.ch/hotbits/
http://www.fourmilab.ch/hotbits/generate.html
"""
import urllib
_url = "http://www.fourmilab.ch/cgi-bin/Hotbits?nbytes=%s&fmt=bin" % n
return urllib.urlopen(_url).read()
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor