I need some help on how to draw graph at runtime in Python.

I have logs running continuously which gives me CPU consumption value vs timestamp in a LOG file.
(I'm able to parse these two values and create a dictionary entry for each timestamp vs CPU value.)

Now I want to plot runtime graph (x y plot) which keeps on updating the current CPU consumption for timestamp value. (x-axis:time ,y-axis:CPU consumption)
Something similar to what I see in Windows Task-bar->Performance tab which shows current CPU consumption.

Any help appreciated...

There are many ways. You may use matplotlib or wxpython. I wrote a code snippet which will give you immediately a graph. Try it ! :)