Re: How to get 'od' run?

2015-11-11 Thread Michael Torrie
On 11/11/2015 08:21 PM, Michael Torrie wrote: > On 11/11/2015 08:04 PM, fl wrote: >> Hi, >> >> I am learning python. I see a previous post has such code: >> >> >> >> >> >>>>> data = '"binääridataa"\n'.encode('utf-8') >>>>> f = open('roska.txt', 'wb') >>>>> f.write(data) >>17 >>

Re: How to get 'od' run?

2015-11-11 Thread Michael Torrie
On 11/11/2015 08:04 PM, fl wrote: > Hi, > > I am learning python. I see a previous post has such code: > > > > > >>>> data = '"binääridataa"\n'.encode('utf-8') >>>> f = open('roska.txt', 'wb') >>>> f.write(data) >17 >>>> f.close() > > The .encode methods produced a

How to get 'od' run?

2015-11-11 Thread fl
Hi, I am learning python. I see a previous post has such code: >>> data = '"binääridataa"\n'.encode('utf-8') >>> f = open('roska.txt', 'wb') >>> f.write(data) 17 >>> f.close() The .encode methods produced a bytestring, which Python likes to display as ASCII characters