# Tests which image formats are supported by your version of Python and DrawingPanel. from DrawingPanel import * def main(): panel = DrawingPanel(800, 200) formats = ["bmp", "gif", "jpg", "png", "ppm"] for i in range(len(formats)): ext = formats[i] x = 5 + 150 * i y = 5 panel.draw_string(ext, x, y) try: panel.draw_image("python-logo." + ext, x, y + 15) except: pass main()