I found an odd problem with Python's struct.pack("!i", 10)
on a Windows system. I get the buffer and save it in to a file, but the result is
00 00 00 0d 0a
where on Mac OSX, the result is
00 00 00 0a
What does the 0d
mean?
When I pass 11
instead of 10
, the result is 00 00 00 0b
. So I think when I pass 10
, the result should be 00 00 00 0a
.
If I want to get 00 00 00 0a
when I pass 10
, what should I do instead?