Re: [coders] Binary manipulation in Python

2007-04-29 Thread Matthew Hannigan
On Tue, Apr 17, 2007 at 04:34:25PM +1000, Carlo Sogono wrote: > I know that many people would tell me that one of the reasons for using > Python is to eliminate the need to do low level operations, but in my > case it's unavoidable. I am working on some cryptographic algorithms > that needs to w

Re: [coders] Binary manipulation in Python

2007-04-18 Thread Ben Leslie
On Wed Apr 18, 2007 at 14:27:49 +1000, Carlo Sogono wrote: >Ben Leslie wrote: >>Also definately recommend the struct class. > >I'm trying to use struct.pack to create a single byte with the value 01. >My two choices are probably x (pad byte) and c (char) but as expected >none of them worked: > >>

Re: [coders] Binary manipulation in Python

2007-04-17 Thread Carlo Sogono
Carlo Sogono wrote: Ben Leslie wrote: Also definately recommend the struct class. I'm trying to use struct.pack to create a single byte with the value 01. My two choices are probably x (pad byte) and c (char) but as expected none of them worked: >>> struct.pack('x', 1) Traceback (most rec

Re: [coders] Binary manipulation in Python

2007-04-17 Thread Carlo Sogono
Ben Leslie wrote: Also definately recommend the struct class. I'm trying to use struct.pack to create a single byte with the value 01. My two choices are probably x (pad byte) and c (char) but as expected none of them worked: >>> struct.pack('x', 1) Traceback (most recent call last): File

Re: [coders] Binary manipulation in Python

2007-04-17 Thread Ben Leslie
On Tue Apr 17, 2007 at 16:34:25 +1000, Carlo Sogono wrote: >I know that many people would tell me that one of the reasons for using >Python is to eliminate the need to do low level operations, but in my >case it's unavoidable. I am working on some cryptographic algorithms >that needs to work wit

Re: [coders] Binary manipulation in Python

2007-04-17 Thread Martin Pool
On 4/17/07, Carlo Sogono <[EMAIL PROTECTED]> wrote: I know that many people would tell me that one of the reasons for using Python is to eliminate the need to do low level operations, but in my case it's unavoidable. I am working on some cryptographic algorithms that needs to work with bits. The

[coders] Binary manipulation in Python

2007-04-16 Thread Carlo Sogono
I know that many people would tell me that one of the reasons for using Python is to eliminate the need to do low level operations, but in my case it's unavoidable. I am working on some cryptographic algorithms that needs to work with bits. The Python Cryptography Toolkit can't help me here so