Jun-24-2018, 10:33 PM
I am making a game from the python and i had some problems so I asked someone and they told me to provide the absolute file path for my picture how do that. Just in case: it is a xcf file i named "backround.gif" and here's the code i'm using to create the picture.
self.bg = PhotoImage(file='Background.gif.xcf') w = self.bg.width() h = self.gb.height() for x in range(0, 5): for y in range(0, 5): self.canvas.create_image_(x * w, y * h, image=self.bg, anchor='nw') self.sprites = [] self.running = True