replacing timestamps in file [newbie]
nukeymusic
nukeymusic at gmail.com
Wed Dec 14 15:32:52 EST 2011
I have a file which has the data in the following format:
Dec-13-09:46:45 21.4 +4.76442190E-01 8.135530E-06 1.553691E+00
Dec-13-09:47:12 21.4 +4.76439120E-01 8.135839E-06 1.553726E+00
Dec-13-09:47:39 21.4 +4.76427260E-01 8.136261E-06 1.553853E+00
.
.
the first field is a timestamp, I'd like to replace it with the time
in seconds starting from the first one like this:
0 21.4 +4.76442190E-01 8.135530E-06 1.553691E+00
27 21.4 +4.76439120E-01 8.135839E-06 1.553726E+00
54 21.4 +4.76427260E-01 8.136261E-06 1.553853E+00
Is there a function in python to achieve this?
thanks in advance
nukey
More information about the Python-list
mailing list