Using a time duration to print out data where every 2 seconds is a pixel
A.T.Hofkamp
hat at se-162.se.wtb.tue.nl
Mon Sep 10 09:48:44 EDT 2007
On 2007-09-10, cjt22 at bath.ac.uk <cjt22 at bath.ac.uk> wrote:
> I want to be able print out the Steps as a visual representation so
> that I can show
> 1. The order the steps started
> 2. The duration of the steps
>
> i.e. a print out such as:
>
>
> [ a ]
> [ b ]
> [ c ]
This graph is commonly known as a Gantt Chart.
The most common use case of such charts is project planning.
The newest GNU plot program has support for these charts afaik.
> Another related question is that I can't seem to do arithmetic when
> the variables are in String format
> of %H:%M:%S or converted to type struct_time
True (but you already detected that).
Either convert your struct_times to floats (time.mktime), or use a date/time
module specialized in computing with dates and times.
(I have seen references to a module called datetime, but I have never used such
a module so no idea what it is or where to get it).
Sincerely,
Albert
More information about the Python-list
mailing list