Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ddfb6cdc
Kaydet (Commit)
ddfb6cdc
authored
Eyl 28, 2009
tarafından
R. David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Applying patches backported from 3.1, by Gregor Lingl.
üst
97f5ff37
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
turtleDemo.py
Demo/turtle/turtleDemo.py
+1
-0
turtle.py
Lib/lib-tk/turtle.py
+8
-3
No files found.
Demo/turtle/turtleDemo.py
Dosyayı görüntüle @
ddfb6cdc
...
@@ -98,6 +98,7 @@ class DemoWindow(object):
...
@@ -98,6 +98,7 @@ class DemoWindow(object):
turtle
.
_Screen
.
_canvas
=
turtle
.
ScrolledCanvas
(
g_frame
,
800
,
600
,
1000
,
800
)
turtle
.
_Screen
.
_canvas
=
turtle
.
ScrolledCanvas
(
g_frame
,
800
,
600
,
1000
,
800
)
#xturtle.Screen._canvas.pack(expand=1, fill="both")
#xturtle.Screen._canvas.pack(expand=1, fill="both")
self
.
screen
=
_s_
=
turtle
.
Screen
()
self
.
screen
=
_s_
=
turtle
.
Screen
()
turtle
.
TurtleScreen
.
__init__
(
_s_
,
_s_
.
_canvas
)
self
.
scanvas
=
_s_
.
_canvas
self
.
scanvas
=
_s_
.
_canvas
#xturtle.RawTurtle.canvases = [self.scanvas]
#xturtle.RawTurtle.canvases = [self.scanvas]
turtle
.
RawTurtle
.
screens
=
[
_s_
]
turtle
.
RawTurtle
.
screens
=
[
_s_
]
...
...
Lib/lib-tk/turtle.py
Dosyayı görüntüle @
ddfb6cdc
#
#
# turtle.py: a Tkinter based turtle graphics module for Python
# turtle.py: a Tkinter based turtle graphics module for Python
# Version 1.0
b1 - 31. 5. 2008
# Version 1.0
.1 - 24. 9. 2009
#
#
# Copyright (C) 2006 - 200
8
Gregor Lingl
# Copyright (C) 2006 - 200
9
Gregor Lingl
# email: glingl@aon.at
# email: glingl@aon.at
#
#
# This software is provided 'as-is', without any express or implied
# This software is provided 'as-is', without any express or implied
...
@@ -1244,9 +1244,12 @@ class TurtleScreen(TurtleScreenBase):
...
@@ -1244,9 +1244,12 @@ class TurtleScreen(TurtleScreenBase):
def
update
(
self
):
def
update
(
self
):
"""Perform a TurtleScreen update.
"""Perform a TurtleScreen update.
"""
"""
tracing
=
self
.
_tracing
self
.
_tracing
=
True
for
t
in
self
.
turtles
():
for
t
in
self
.
turtles
():
t
.
_update_data
()
t
.
_update_data
()
t
.
_drawturtle
()
t
.
_drawturtle
()
self
.
_tracing
=
tracing
self
.
_update
()
self
.
_update
()
def
window_width
(
self
):
def
window_width
(
self
):
...
@@ -1337,6 +1340,7 @@ class TurtleScreen(TurtleScreenBase):
...
@@ -1337,6 +1340,7 @@ class TurtleScreen(TurtleScreenBase):
### consequently drawing a hexagon
### consequently drawing a hexagon
"""
"""
if
fun
==
None
:
if
fun
==
None
:
if
key
in
self
.
_keys
:
self
.
_keys
.
remove
(
key
)
self
.
_keys
.
remove
(
key
)
elif
key
not
in
self
.
_keys
:
elif
key
not
in
self
.
_keys
:
self
.
_keys
.
append
(
key
)
self
.
_keys
.
append
(
key
)
...
@@ -3574,8 +3578,8 @@ class _Screen(TurtleScreen):
...
@@ -3574,8 +3578,8 @@ class _Screen(TurtleScreen):
topbottom
=
_CFG
[
"topbottom"
]
topbottom
=
_CFG
[
"topbottom"
]
self
.
_root
.
setupcanvas
(
width
,
height
,
canvwidth
,
canvheight
)
self
.
_root
.
setupcanvas
(
width
,
height
,
canvwidth
,
canvheight
)
_Screen
.
_canvas
=
self
.
_root
.
_getcanvas
()
_Screen
.
_canvas
=
self
.
_root
.
_getcanvas
()
self
.
setup
(
width
,
height
,
leftright
,
topbottom
)
TurtleScreen
.
__init__
(
self
,
_Screen
.
_canvas
)
TurtleScreen
.
__init__
(
self
,
_Screen
.
_canvas
)
self
.
setup
(
width
,
height
,
leftright
,
topbottom
)
def
setup
(
self
,
width
=
_CFG
[
"width"
],
height
=
_CFG
[
"height"
],
def
setup
(
self
,
width
=
_CFG
[
"width"
],
height
=
_CFG
[
"height"
],
startx
=
_CFG
[
"leftright"
],
starty
=
_CFG
[
"topbottom"
]):
startx
=
_CFG
[
"leftright"
],
starty
=
_CFG
[
"topbottom"
]):
...
@@ -3615,6 +3619,7 @@ class _Screen(TurtleScreen):
...
@@ -3615,6 +3619,7 @@ class _Screen(TurtleScreen):
if
starty
is
None
:
if
starty
is
None
:
starty
=
(
sh
-
height
)
/
2
starty
=
(
sh
-
height
)
/
2
self
.
_root
.
set_geometry
(
width
,
height
,
startx
,
starty
)
self
.
_root
.
set_geometry
(
width
,
height
,
startx
,
starty
)
self
.
update
()
def
title
(
self
,
titlestring
):
def
title
(
self
,
titlestring
):
"""Set title of turtle-window
"""Set title of turtle-window
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment