On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > calc_crc(b'\x00\x00\x34\x35\x38\x35')
>
>
>
> > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
>
>
>
> The first two bytes differ; you made an error on the input.
Dear Peter,
On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > calc_crc(b'\x00\x00\x34\x35\x38\x35')
>
>
>
> > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
>
>
>
> The first two bytes differ; you made an error on the input.
Dear Peter,
dream4s...@gmail.com wrote:
> calc_crc(b'\x00\x00\x34\x35\x38\x35')
> unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
The first two bytes differ; you made an error on the input.
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>
> >> dream4s...@gmail.com wrote:
>
> >>
>
> >>
>
> >>
>
> >> > I have trouble to implement crc algorithm in p
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>
> >> dream4s...@gmail.com wrote:
>
> >>
>
> >>
>
> >>
>
> >> > I have trouble to implement crc algorithm in p
On 03/09/2014 07:19, dream4s...@gmail.com wrote:
Would you please access this list via
https://mail.python.org/mailman/listinfo/python-list or read and action
this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
seeing double line spacing and single line paragraphs, thanks.
--
dream4s...@gmail.com wrote:
> On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>> dream4s...@gmail.com wrote:
>>
>>
>>
>> > I have trouble to implement crc algorithm in python 3.3
>>
>> >
>>
>> > c version work perfect. I try to use bytes, int and c_types without
>> > any
On Tuesday, September 2, 2014 9:43:52 PM UTC+3, Chris Kaynor wrote:
> Also, depending on the use-case, binascii.crc32 might also work fine:
> https://docs.python.org/2/library/binascii.html#binascii.crc32
>
>
>
>
> import binascii
> def calc_crc(data):
> return binascii.crc32(data)
>
>
>
On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > I have trouble to implement crc algorithm in python 3.3
>
> >
>
> > c version work perfect. I try to use bytes, int and c_types without any
>
> > success can some who help me:
>
>
>
Also, depending on the use-case, binascii.crc32 might also work fine:
https://docs.python.org/2/library/binascii.html#binascii.crc32
import binascii
def calc_crc(data):
return binascii.crc32(data)
Much simpler.
Chris
On Tue, Sep 2, 2014 at 11:24 AM, Peter Otten <__pete...@web.de> wrote:
dream4s...@gmail.com wrote:
> I have trouble to implement crc algorithm in python 3.3
>
> c version work perfect. I try to use bytes, int and c_types without any
> success can some who help me:
ctypes is for interfacing with C; don't use it in regular code.
> c version:
>
> unsigned short cal
11 matches
Mail list logo