mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #3965: Allow repeated calls to turtle.Screen, by making it a
true singleton object. Reviewed by Gregor Lingl.
This commit is contained in:
parent
e144873071
commit
e563aa4383
4 changed files with 40 additions and 34 deletions
|
@ -94,8 +94,8 @@ class DemoWindow(object):
|
|||
left_frame.pack(side=LEFT, fill=BOTH, expand=0)
|
||||
self.graph_frame = g_frame = Frame(root)
|
||||
|
||||
turtle.Screen._root = g_frame
|
||||
turtle.Screen._canvas = turtle.ScrolledCanvas(g_frame, 800, 600, 1000, 800)
|
||||
turtle._Screen._root = g_frame
|
||||
turtle._Screen._canvas = turtle.ScrolledCanvas(g_frame, 800, 600, 1000, 800)
|
||||
#xturtle.Screen._canvas.pack(expand=1, fill="both")
|
||||
self.screen = _s_ = turtle.Screen()
|
||||
self.scanvas = _s_._canvas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue