Time script help sought!

sp1d3rx at gmail.com sp1d3rx at gmail.com
Tue Jan 11 15:49:04 EST 2005


using my code above...
start = x[3].split(":") #split the minutes from the seconds
this splits something like 1:22:40 into three parts
1(hours), 22(mintes), 40(seconds)
so, you must add a special case handler...
if len(start) == 3:
{
start[1] = int(start[0]) * 60 + int(start[1])
start = start[1], start[2]
}
and there you go....
what this does is take the hours , multiply them by 60 and add it to
the minutes.
You will also have to change your output function to convert from
"seconds" to "hours, minutes, seconds".




More information about the Python-list mailing list