[Tutor] Where to start?

Alan Gauld alan.gauld at btinternet.com
Sat Feb 2 08:25:53 CET 2008

"William Kilmartin" <williamakilmartin at yahoo.com> wrote

> It then needs to create the graph, store the names, be able to take 
> the
> week's numbers and store them along with being able to print.  The
> highest and lowest points also need to also be inputed and changed 
> if
> needed.
> Ideally this would be a GUI driven app for the sake of simplicity.
> What I'm looking for is advice on where to start, a middle ground 
> and an
> end.  I'm new to Python and programming and took this as the 1st 
> thing
> I'd to create.

I'd start off with a non gui version to check that the logic and math 
The simplest non GUI approach will be a week by week horizontal
bar chart:

wk5    *****************        $5K
wk4    ********                    $2K
wk3    ************                $3K
wk2    **************            $4K
wk1    *****                        $7K
Calls        10    20    30    Total

This is fairly easy to do using string formatting and print 

Then work on saving the data to a file - a simple text file would do,
or you could use pickle or even shelve. Shelve would be my
bet since it will allow you to add the ability to easily retrieve
data over a limited period or from archive etc

Finally convert the text form of the graph to a GUI version using
your favourite toolkit. This wouldn't be hard to do from scratch
using a bare Canvas widget but there are plotting libraries
available that make it easier still.


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list