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


Groups > comp.lang.python > #80713

Re: How to recover bytes function?

References <44f58abf-35a8-4741-8b7c-7eabe99a326d@googlegroups.com>
Date 2014-11-14 10:14 +1100
Subject Re: How to recover bytes function?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.15794.1415920478.18130.python-list@python.org> (permalink)

Show all headers | 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