[issue12889] struct.pack('d'... problem

2011-09-03 Thread Dr . Georg Ströhlein
Dr. Georg Ströhlein added the comment: Thank you, Mark, for explaining the details of how to "correctly" format the output of that command to me... Regards, Schorsch -- ___ Python tracker

[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson
Mark Dickinson added the comment: > with codes 0x3f and 0x63 respectively Whoops: that should be '... 0x3f and 0x6e ...'. -- ___ Python tracker ___ ___

[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson
Mark Dickinson added the comment: I agree with you on the correct 8 output bytes. And those expected bytes are exactly what struct.pack is producing here: Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:40:35) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "packages", "demo"

[issue12889] struct.pack('d'... problem

2011-09-02 Thread Dr . Georg Ströhlein
Dr. Georg Ströhlein added the comment: link is here: http://carolomeetsbarolo.files.wordpress.com/2011/08/double_2_hex.pdf -- ___ Python tracker ___

[issue12889] struct.pack('d'... problem

2011-09-02 Thread Dr . Georg Ströhlein
New submission from Dr. Georg Ströhlein : Hi all, I think there is a long-standing bug (it has made it into books on Google...) in the struct.pack() function, at least if the 'd' format string is selected. On both Win and Ubuntu the string returned for pack('!d',1.2345) is '?\xf3\xc0\x83\x12n