def __init__(self, dimensions, offsets, scale, root=None, run=1, background=None): TkSimulator.__init__(self, dimensions=dimensions, offsets=offsets, scale=scale, root=root, run=run) self.backgroundFile = background if (self.backgroundFile != None): try: self.backgroundImage = ImageTk.PhotoImage( Image.open(background), master=self) self.canvas.create_image(0, 0, anchor="nw", image=self.backgroundImage, tags="background") except: self.backgroundImage = None print "Error opening image file ", background, " I will ignore it." print "", sys.exc_info()[0] print "", sys.exc_info()[1] print "", sys.exc_info()[2]
def __init__(self, dimensions, offsets, scale, root = None, run = 1): TkSimulator.__init__(self, dimensions=dimensions, offsets=offsets, scale=scale, root=root, run=run) self.resetMarkers()