Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Laura Creighton Newsgroups: comp.lang.python Subject: Re: Problems using struct pack/unpack in files, and reading them. Date: Fri, 13 Nov 2015 21:17:31 +0100 Lines: 5 Message-ID: References: <20151113192045.GA9913@z-sverige.nu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: news.uni-berlin.de OiNqXVxQ29ooABavnd925QiUVA1qIs87CBMVKm6B+Bsw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'subject:files': 0.09; 'subject:using': 0.09; 'add.': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'expected,': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Problems': 0.16; 'laura': 0.18; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'struct': 0.22; 'forgot': 0.23; 'error': 0.27; 'have,': 0.27; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'subject:/': 0.30; 'shorter': 0.33; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'data': 0.39; 'well.': 0.40; 'your': 0.60; 'header:Message- Id:1': 0.61; 'more': 0.63; 'header:In-reply-to:1': 0.84; 'subject:pack': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1447445853; bh=E+7ZvqFAhziF+osyDG5m/sEmm4NWsvMI7l52NsvXrl8=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=KgtsatmJxtncblvo7HEC7y9587F0bxFJT8eumT+xzDBUQuSErXhKRbwubEkYrDJ/P yKojXTLa0GOd3EmvdKntOrYV7/5ewF01T8/crj9jMEqJXyuJvdZeuR1GKkiqSgVB7+ 4udjkjgbxBWDWCodKGvTYZ2YlBPwj8XxkA5JeoBU= In-reply-to: <20151113192045.GA9913@z-sverige.nu> Comments: In-reply-to kent nyberg message dated "Fri, 13 Nov 2015 14:20:45 -0500." Content-ID: <28338.1447445851.1@fido> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Fri, 13 Nov 2015 21:17:33 +0100 (CET) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98766 I forgot to add. You get this wretched error message if your data is shorter than expected, and you ask struct to read more than you have, as well. most annoying. Laura