You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've used turtle.py quite a bit in my teaching, and a common question is how learners can save their files. Now, the turtle library only supports saving the drawings as postscript files by calling the cryptic command turtle.getscreen().getcanvas().postscript(file=filename). Whenever a learner asks “How can I print what I made?”, I’ll have to show them that extremely scary command with method chaining -- not the best snippet to show someone who’s still struggling with functions…
If we instead had a turtle.save("filename.ps"), then I could tell the learners to use that function and an online postscript to pdf converter, which should be understandable to most learners
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Activity
yngvem commentedon Sep 2, 2024
@MarieRoald and I will submit a pull request on this shortly
pythongh-123614: Add save function to turtle.py
[-]# A save function in the Turtle module[/-][+]A save function in the Turtle module[/+]pythongh-123614: Add save function to turtle.py
pythongh-123614: Add save function to turtle.py
pythongh-123614: Add save function to turtle.py
pythongh-123614: Add save function to turtle.py
pythongh-123614: Add docstring
rruuaanng commentedon Sep 4, 2024
hugovk commentedon Sep 4, 2024
rruuaanng commentedon Sep 4, 2024
pythongh-123614: Add docs and change exception type
pythongh-123614: Escape backslashes in Windows paths
pythongh-123614: Escape backslashes in Windows paths
gh-123614: Add save function to turtle.py (#123617)