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


Groups > comp.lang.python > #80708

How to recover bytes function?

Newsgroups comp.lang.python
Date 2014-11-13 14:32 -0800
Message-ID <44f58abf-35a8-4741-8b7c-7eabe99a326d@googlegroups.com> (permalink)
Subject How to recover bytes function?
From satishmlmlml@gmail.com

Show all headers | View raw


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?

Back to comp.lang.python | Previous | Next — 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