in reply to pack() gives me "character wrapped" warnings

Use upper case "C". "c" is for signed bytes in 2's complement, thus the range -128 to 127. "C" is for unsigned bytes, range 0 to 255.

The complaint is that it got numbers >= 128, which isn't in its normal range. It happens to give the proper result, but unpacking the bytes again, with "c", would yield different results for those bytes.

  • Comment on Re: pack() gives me "character wrapped" warnings