Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-17 Thread Reinhold Birkenfeld
Grant Edwards wrote: > I give up, how do I make this not fail under 2.4? > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has > the hi

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Grant Edwards
On 2005-09-16, Terry Reedy <[EMAIL PROTECTED]> wrote: >> One of the nasty bits in a pure-python approach is that there's >> no way to write a literal with a fixed length. For example, >> instead of writing 0xf7 to get an 8-bit value and 0x12345789 to >> get a 32-bit value, you have to instantiate

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Terry Reedy
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > One of the nasty bits in a pure-python approach is that there's > no way to write a literal with a fixed length. For example, > instead of writing 0xf7 to get an 8-bit value and 0x12345789 to > get a 32-bit value, you

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Bengt Richter
On Fri, 16 Sep 2005 14:57:15 -, Grant Edwards <[EMAIL PROTECTED]> wrote: [...] > >What I would really, really like are fixed length integer types >so that I can manipulate 8, 16, 32 and maybe 64 bit, 2's >compliment values. I've seen some pretty good "user-space" >pure-python implimentations,

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Grant Edwards
On 2005-09-16, Raymond L. Buvel <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> I give up, how do I make this not fail under 2.4? >> >> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >> >> I get an OverflowError: long int too large to convert to int >> >> ioct

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Raymond L. Buvel
Grant Edwards wrote: > I give up, how do I make this not fail under 2.4? > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has > the hi

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Bengt Richter
On Fri, 16 Sep 2005 01:25:30 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-09-15, Terry Reedy <[EMAIL PROTECTED]> wrote: > >>>I give up, how do I make this not fail under 2.4? >>> >>> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >>> >>> I get an OverflowE

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Grant Edwards
On 2005-09-15, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >> >> I get an OverflowError: long int too large to convert to int > You could sort-of fake it like this, > > def unsigned(val): > return struct.unpack(

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Grant Edwards
On 2005-09-15, Terry Reedy <[EMAIL PROTECTED]> wrote: >>I give up, how do I make this not fail under 2.4? >> >> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >> >> I get an OverflowError: long int too large to convert to int >> >> ioctl() is expecting a 32-bit intege

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread chrisperkins99
Grant Edwards wrote: > I give up, how do I make this not fail under 2.4? > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has > the high-

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Terry Reedy
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I give up, how do I make this not fail under 2.4? > > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecti