Q:

Why are the Tkinter canvas lines jagged?

The lines drawn on a Tkinter.Canvas are not smooth. How can they be made smooth?
Here's what I tried:
 from Tkinter import *
 root = Tk()
 cv = Canvas(root,bg = 'white')
 rt1 = cv.create_rectangle(10,10,110,110,width = 8,tags = ('r1','r2','r3'))

 def printRect(event):
     print 'rectangle'
 def printLine(event):
     print 'line'

 cv.tag_bind('r1','<Button-1>',printRect)
 cv.tag_bind('r1','<Button-3>',printLine)
 cv.create_line(10,20,200,200,width = 5,tags = 'r1')
 cv.pack()
 root.mainloop()

Here's what it looks like:

A:

tkinter graphics are not anti-aliased which is why the diagonal line appears jagged. There may be a platform specific work-around like this one I found titled Drawing Anti-Aliased Graphics Under Tkinter/Windows to provide the functionality you desire.

