Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80713

Re: How to recover bytes function?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; "'rb')": 0.16; 'callable': 0.16; 'file.read()': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function?': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'bytes': 0.24; 'char': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'fri,': 0.33; 'received:google.com': 0.35; '14,': 0.36; 'subject:?': 0.36; 'nov': 0.38; 'skip:[ 10': 0.38; 'skip:b 40': 0.39; 'how': 0.40; 'records': 0.73; 'recover': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=yiHgYfvkHfJQ8BS822SskD/0RRwdfb7O6hfGWFE14JE=; b=htnbXHMmFN9mvXsDrUr2ezcek2NsT2Y5QHT84z2U2nBja64Vez+H+YXh/RdivqHkdi 1fxAzyd8+DI8+liLLAGQnOQGAM6LIkOMTysPzSVIhiXih47CcitugByEfgeGw4JsFstZ 6eVyTKladaXB0X5N4ho9IsQrtEFvBmytlOLZrkQwnA+nqDHUihBKBWPFHVGodr3gaCRA XHVd1x4IZ5MJdHmMQ9zNP6gn8KxG6OlkymoW8GIiW5TtWQL5I4CoD0QXZ7m3mAJjGDLl HvBTVPnSyqL0UQR5+mZ/sCskA9L7BD9Rc4yyEWZRuDJcTl+QARMlOK/eNvr6+v/SKwmZ YzDQ==
MIME-Version 1.0
X-Received by 10.107.135.146 with SMTP id r18mr6022233ioi.62.1415920476244; Thu, 13 Nov 2014 15:14:36 -0800 (PST)
In-Reply-To <44f58abf-35a8-4741-8b7c-7eabe99a326d@googlegroups.com>
References <44f58abf-35a8-4741-8b7c-7eabe99a326d@googlegroups.com>
Date Fri, 14 Nov 2014 10:14:36 +1100
Subject Re: How to recover bytes function?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15794.1415920478.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415920478 news.xs4all.nl 2907 [2001:888:2000:d::a6]:52694
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80713

Show key headers only | View raw


On Fri, Nov 14, 2014 at 9:32 AM,  <satishmlmlml@gmail.com> wrote:
> file = open('data.bin', 'rb')
> bytes = file.read()
> bytes
> b'\x00\x00\x00\x02spam\x00\x03?\x9d\xf3\xb6'
> records = [bytes([char] * 8) for char in b'spam']
> TypeError: 'bytes' object is not callable
>
> How to recover bytes function?

del bytes

ChrisA

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to recover bytes function? satishmlmlml@gmail.com - 2014-11-13 14:32 -0800
  Re: How to recover bytes function? MRAB <python@mrabarnett.plus.com> - 2014-11-13 23:12 +0000
  Re: How to recover bytes function? Chris Angelico <rosuav@gmail.com> - 2014-11-14 10:14 +1100
  Re: How to recover bytes function? sohcahtoa82@gmail.com - 2014-11-13 15:16 -0800
  Re: How to recover bytes function? Ben Finney <ben+python@benfinney.id.au> - 2014-11-14 10:37 +1100
  Re: How to recover bytes function? Cameron Simpson <cs@zip.com.au> - 2014-11-14 18:46 +1100

csiph-web