Re: python b'...' notation

2013-05-31 Thread jmfauth
On 31 mai, 00:19, alcyon wrote: > On Wednesday, May 29, 2013 3:19:42 PM UTC-7, Cameron Simpson wrote: > > On 29May2013 13:14, Ian Kelly wrote: > > > | On Wed, May 29, 2013 at 12:33 PM, alcyon wrote: > > > | > This notation displays hex values except when they are 'printable', in > > which case

Re: python b'...' notation

2013-05-30 Thread alcyon
On Wednesday, May 29, 2013 3:19:42 PM UTC-7, Cameron Simpson wrote: > On 29May2013 13:14, Ian Kelly wrote: > > | On Wed, May 29, 2013 at 12:33 PM, alcyon wrote: > > | > This notation displays hex values except when they are 'printable', in > which case it displays that printable character. Ho

Re: python b'...' notation

2013-05-29 Thread Cameron Simpson
On 29May2013 13:14, Ian Kelly wrote: | On Wed, May 29, 2013 at 12:33 PM, alcyon wrote: | > This notation displays hex values except when they are 'printable', in which case it displays that printable character. How do I get it to force hex for all bytes? Thanks, Steve | | Is this what you wa

Re: python b'...' notation

2013-05-29 Thread Ian Kelly
On Wed, May 29, 2013 at 12:33 PM, alcyon wrote: > This notation displays hex values except when they are 'printable', in which > case it displays that printable character. How do I get it to force hex for > all bytes? Thanks, Steve Is this what you want? >>> ''.join('%02x' % x for x in b'hel