6 Sep
2001
6 Sep
'01
1:09 a.m.
def stringToLong(s): """ Convert bytes to long integer """ ... def stringToDWords(s): """ Convert bytes to a list of four 32-bits words """ ... def longToString(l): """ Convert long to digest """ ...
Was there a good reason you reimplemented the struct module in Python?
Well, struct seems almost like an overkill, but could probably replace most usage of these routines. If I should need a good reason for keeping them, it would be my uncertainity of its (structs) endianism/portability since the codes need to be. It just looks like a module only used in interfacing. This is an only excuse since I didn't know of struct. :) Thanks for the tip // phed