C API for Python's RNG?
Gerhard Häring
gerhard.haering at gmx.de
Fri Jun 28 15:35:23 EDT 2002
* Tom Loredo <loredo at astro.cornell.edu> [2002-06-28 15:41 -0400]:
> Tom Loredo wrote:
> >
> > I'll dig in the source to try to puzzle
> > it out, but I thought I should ask publicly:
>
> Oops! I should have dug first---the standard lib RNG is pure
> Python. So I guess it's Numeric or some third-party RNG if
> I want to do this quickly. Any suggestions?
<clueless>
What about reading from /dev/random?
</clueless>
Isn't rand() even in the C standard library? Ok, the standard
implementation is normally pretty bad, or so I hear.
Gerhard
--
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list
mailing list