Generating a large random string

Paul Rubin http
Fri Feb 20 02:48:53 CET 2004

"Sean Ross" <sross at> writes:
> I'd be interested to see how
> s = open("/dev/urandom").read(3000)
> compares, and, if better, whether something similar can
> be done on Windows.

On Linux, this is almost instantaneous.  Reading 1 megabyte takes
under a second on my 700 mhz P3.

More information about the Python-list mailing list