data conversion question (binary string to 'real string')

Manish Jethani manish.j at gmx.net
Fri Jul 25 15:03:51 CEST 2003


Alexander Eisenhuth wrote:

> maby I don't see the forest because of all that trees, but :

Maybe I don't understand your question...

> from struct import *
> 
> 
> # how can I convert
> f = float(0.5)
> 
> # with
> bin_str =  pack('!f', 0.5)
> 
> # now bin_str is '?\x00\x00\x00'
> 
> 
> # to "3F000000" ?????

???????????????
What is your question?

-Manish

-- 
Manish Jethani (manish.j at gmx.net)
phone (work) +91-80-51073488





More information about the Python-list mailing list