Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'mrab': 0.05; 'chunk': 0.07; 'subject:help': 0.07; '22,': 0.09; 'fetch': 0.09; 'slightly': 0.15; 'chunk:': 0.16; 'oct': 0.16; 'read:': 0.16; 'travis': 0.16; 'true:': 0.16; 'wrote:': 0.17; 'thanks,': 0.18; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'appreciated.': 0.26; 'it."': 0.29; 'signatures': 0.29; 'could': 0.32; 'skip:l 40': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'received:172.16': 0.34; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'header:Message-Id:1': 0.62; 'between': 0.63; 'different': 0.63; 'great': 0.64; 'localized': 0.84; 'habit': 0.91; 'ideas.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=9ibByp/T1PdBfwT6ldIhoO62jEURcZLnsYMRluzvRVU=; b=weLMVoG9fW6jCKz/mts+q8DsxJMOfbo+aAL7oG1tjPnEiAuEoBVsUGV9SAyL/4lhjP rIdjhYR+LEdnFZpb6YIX0YKvrN3PaDH1nwbKzt3gfD87Ymj8d2obPqzzoLbeRCHwPZjY H2SdlmfEu7V4GjhwatvCkwE9Yrlbrn4On0h5Bo1vYdlj32VH48BiD4waOH3UTn/A9kJJ 8WdrhBCZIu7x73VnQkF+q8NWRTnEsRLsoEv7VX/r3Ecp7pUrZkwWUAg1B0ulLPc43WRT 2O5f2pvkMG3f0QFXjDW4871nVdCuvSB31kNovDXjqE+sWig4Fln3dCBx7FtFAxqaQbut Uimw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Style help for a Smalltalk-hack From: Travis Griggs In-Reply-To: <5085F3DA.1010809@mrabarnett.plus.com> Date: Tue, 23 Oct 2012 08:13:25 -0700 Content-Transfer-Encoding: quoted-printable References: <168DF25C-0C43-45F2-BEDC-17AC4210F207@gmail.com> <5085F3DA.1010809@mrabarnett.plus.com> To: python-list@python.org X-Mailer: Apple Mail (2.1499) 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351005210 news.xs4all.nl 6982 [2001:888:2000:d::a6]:40095 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31934 On Oct 22, 2012, at 6:33 PM, MRAB wrote: > Another way you could do it is: >=20 > while True: > chunk =3D byteStream.read(4) > if not chunk: > break > ... >=20 > And you could fetch multiple signatures in one read: >=20 > signatures =3D list(struct.unpack('>{}I'.format(valveCount), = byteStream.read(4 * valueCount))) Thanks, both great ideas. Still does the read/decode slightly different = between the different sites, but at least it's localized better. Much = appreciated. -- Travis Griggs "History has a habit of changing the people who think they are changing = it." -Terry Pratchett