Solutons Lounge

python – How to make Turtle Screen appear on top of all other windows


I’m taking a pretty simple coding class and one of the ways to get extra credit, and spice up the work, is to add images via turtle. I can get the image to show but I would really like the image on top of the other applications that are running vs just opening in the background, or at the bottom layer. Here’s the parts of the code used to get the image to work, I’ll leave out the rest.

from turtle import *
#I'm importing turtle so I can display an image later.
Image = ("Darth.gif")
#I'm assigning the image I want to display to the value Image
addshape(Image)
#I'm adding a shape and assigning it the value of the variable Image
shape(Image)
#This will display the shape in the variable Image.

Most of what I’m finding online uses an import turtle and commands that just don’t seem to work well with this version of turtle I’m using. The professor doesn’t require it to appear on top it’s just what I want to have happen. The code “works” in that the image comes up, just behind whatever is running. Thanks in advance for the help.



Source link

Exit mobile version