Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.054 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:script': 0.09; 'cc:addr:python-list': 0.11; 'random': 0.14; 'cc:name:python list': 0.16; 'instead:': 0.16; 'realising': 0.16; 'subject:random': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; "d'aprano": 0.31; 'lot.': 0.31; 'steven': 0.31; 'run': 0.32; 'running': 0.33; 'could': 0.34; 'received:209.85': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'received:209': 0.37; 'generating': 0.39; 'how': 0.40; 'is.': 0.60; 'numbers': 0.61; 'of:': 0.68; 'oscar': 0.84; 'subject:long': 0.84; 'subject:very': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NMM/kwFVFrJtXzcre939KxfxDOGHYIXE8Kh1wMNUK+s=; b=rwsU4KKwAjJLsp+gXZTkGFo/K/qr65am39Wkr6i5dxHI3N0e22MGbN75/yfdrfaTzs rj6RxDxbKq3AWVoeJodVBnlQIHT9+/phrHiTWt9D/1I1cr7SeKLqgO0rZDttrkrTdSWc HiVOQG2tgvxBFafHC9jeUeWVZ+tEyD0pMvRgmXbH37m7AUXDl9Y3ndZooLdfXPXm0MuW hwpvvwTCElfDtccbb212/Qa5bmE761T5+O5Ox9mM7gbme1eLauu1aOveCblaW0U2KXym UwArKkjFWg/0DAWdTC9r8oSYV5dIjxjazl80b2FvGbCIxqr/n71qc5D5ddXvsvByCsFr qmpQ== X-Received: by 10.220.71.200 with SMTP id i8mr4352986vcj.44.1365673683510; Thu, 11 Apr 2013 02:48:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <51666aae$0$29977$c3e8da3$5496439d@news.astraweb.com> References: <24dc619b-7abd-4be3-aa92-f858eb4ab85f@n4g2000yqj.googlegroups.com> <51666aae$0$29977$c3e8da3$5496439d@news.astraweb.com> From: Oscar Benjamin Date: Thu, 11 Apr 2013 10:47:43 +0100 Subject: Re: performance of script to write very long lines of random chars To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365673692 news.xs4all.nl 2676 [2001:888:2000:d::a6]:50969 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43344 On 11 April 2013 08:47, Steven D'Aprano wrote: > One thing to be aware of: urandom may run out of entropy, and then it > will slow down a lot. If you don't care about cryptographic randomness, > you could use this instead: Reading this I'm realising that I don't really know what os.urandom is. How exactly is it generating random numbers and what do you mean by it running out of entropy? Oscar