So I have created a Turtle graphics program where the user can draw many different shapes on a canvas, and have implemented the ability for the user to save the canvas with his/her own name as a Postscript (.ps) file using a file browser. The file apparently has no problem opening up in Preview on my Macintosh. I have also allowed the user to import ANY .gif image they want and set that as the canvas color of the window or even just set it to a solid color if they don't want to use an image. However, I noticed that whenever I change ONLY the canvas color of the window, save it as a postscript file, and then open it, the canvas color does NOT show up, but the rest of the colors do, including the turtle's. What's even weirder is that if I instead set an image as the canvas, it shows up in the saved postscript file along with everything else. So, why is this happening, and how would I fix it? Any help is very much appreciated! :)
P.S. I have already seen this similar question, but it apples to Python 2.x, while I have 3.5. I also don't like the solution of that question and I am hoping there is another, better way to fix this now.
Here is my save code:
def savefirst():
cnv = getscreen().getcanvas()
global hel
hel = filedialog.asksaveasfilename(defaultextension = '.ps')
fev = cnv.postscript(file = hel, colormode = 'color')
try:
if open(hel, 'r'):
savefirst.save = True
except:
savefirst.save = False
And here is a screenshot of the canvas itself comparing it to a screenshot of the Postscript file-
Screenshot of Postscript file (in Preview):
EDIT: I have looked around a lot, but I cannot find an answer that apples to Python 3.x.