Saving a Tkinter Canvas Drawing (Python)

The Tkinter GUI toolkit's canvas object is very nice for all sorts of drawings and plotting. However, when it comes to saving the image Tkinter limits you to postscript printer files. One solution is to draw the same image in parallel on PIL's image-draw object in memory. This is made relatively simple, as the Tkinter and PIL methods function pretty much the same.

Here is a Python code snippet showing you the basics in the form of a plot of two trig functions.

I am drawing different figures like circle,rectangle,line etc in my application. I am using wxpython. I have created a menu. I want to save the file and store its content . I have created the file dialog. But I am not getting how to store the contents.How do I go about it??
Do I have to use Cpickle?? I tried understanding it but not much luck in that.