ceasar102 at yahoo.com
Fri Aug 29 23:13:04 CEST 2008
I wrote a python program that used time() function from the time module to retrieve time in seconds since Epoch. After the value was retrieved which I checked is a float by using type(), the value was then written into a file in binary format. Then another C program that I wrote opened the file and converted the value into a time_t variable but it was totally different from the correct value. Then I found that the time_t size is actually 4 byte integer which is not the same with 8-byte float value returned by time.time(). Why is this so? Being written with C library, isn't python suppose to work well with it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor