[Tutor] time calc

kevin parks kp8 at mac.com
Fri Jun 18 13:36:10 EDT 2004


hi all.

I have a bit of a task that i have been doing by hand, but as it turns 
out there is pages and pages more of this so i would like to make a 
python script that does this work and have it handy.

I have a list that has several columns like so:

1    1    1    00:23
1    2    2    8:23
1    3    3    9:41
1    4    3    10:47
1    5    3     11:21


What this is a list that has tape number, program number, item number 
and start time for a recording.

What i want to do is append the duration to the end of this list by 
subtracting the start of the item from the start time of the next so 
that the first line would look like:

1    1    1    00:23    08:00
1    2    2    8:23      01:18

etc.

So the task is really two part : reading in a list of numbers and 
adding one more piece of data and (2) doing time (base 60) math. It is 
the time math part i simply can't get my head around. Anyone know if 
there is a module that does time math? or a method for doing this by 
hand?

cheers,

kevin parks





More information about the Tutor mailing list