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
2ced87f3
Kaydet (Commit)
2ced87f3
authored
Agu 27, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #22065: Remove the now unsed configGUI menu parameter and arguments.
üst
8450c533
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
__main__.py
Lib/turtledemo/__main__.py
+8
-10
No files found.
Lib/turtledemo/__main__.py
Dosyayı görüntüle @
2ced87f3
...
@@ -180,7 +180,7 @@ class DemoWindow(object):
...
@@ -180,7 +180,7 @@ class DemoWindow(object):
self
.
exitflag
=
False
self
.
exitflag
=
False
if
filename
:
if
filename
:
self
.
loadfile
(
filename
)
self
.
loadfile
(
filename
)
self
.
configGUI
(
NORMAL
,
DISABLED
,
DISABLED
,
DISABLED
,
self
.
configGUI
(
DISABLED
,
DISABLED
,
DISABLED
,
"Choose example from menu"
,
"black"
)
"Choose example from menu"
,
"black"
)
self
.
state
=
STARTUP
self
.
state
=
STARTUP
...
@@ -225,9 +225,7 @@ class DemoWindow(object):
...
@@ -225,9 +225,7 @@ class DemoWindow(object):
turtle
.
RawTurtle
.
screens
=
[
_s_
]
turtle
.
RawTurtle
.
screens
=
[
_s_
]
return
canvas
return
canvas
def
configGUI
(
self
,
menu
,
start
,
stop
,
clear
,
txt
=
""
,
color
=
"blue"
):
def
configGUI
(
self
,
start
,
stop
,
clear
,
txt
=
""
,
color
=
"blue"
):
self
.
mBar
.
entryconfigure
(
0
,
state
=
menu
)
self
.
start_btn
.
config
(
state
=
start
,
self
.
start_btn
.
config
(
state
=
start
,
bg
=
"#d00"
if
start
==
NORMAL
else
"#fca"
)
bg
=
"#d00"
if
start
==
NORMAL
else
"#fca"
)
self
.
stop_btn
.
config
(
state
=
stop
,
self
.
stop_btn
.
config
(
state
=
stop
,
...
@@ -276,7 +274,7 @@ class DemoWindow(object):
...
@@ -276,7 +274,7 @@ class DemoWindow(object):
self
.
text
.
insert
(
"1.0"
,
chars
)
self
.
text
.
insert
(
"1.0"
,
chars
)
self
.
root
.
title
(
filename
+
" - a Python turtle graphics example"
)
self
.
root
.
title
(
filename
+
" - a Python turtle graphics example"
)
reload
(
self
.
module
)
reload
(
self
.
module
)
self
.
configGUI
(
NORMAL
,
NORMAL
,
DISABLED
,
DISABLED
,
self
.
configGUI
(
NORMAL
,
DISABLED
,
DISABLED
,
"Press start button"
,
"red"
)
"Press start button"
,
"red"
)
self
.
state
=
READY
self
.
state
=
READY
...
@@ -284,7 +282,7 @@ class DemoWindow(object):
...
@@ -284,7 +282,7 @@ class DemoWindow(object):
self
.
refreshCanvas
()
self
.
refreshCanvas
()
self
.
dirty
=
True
self
.
dirty
=
True
turtle
.
TurtleScreen
.
_RUNNING
=
True
turtle
.
TurtleScreen
.
_RUNNING
=
True
self
.
configGUI
(
DISABLED
,
DISABLED
,
NORMAL
,
DISABLED
,
self
.
configGUI
(
DISABLED
,
NORMAL
,
DISABLED
,
"demo running..."
,
"black"
)
"demo running..."
,
"black"
)
self
.
screen
.
clear
()
self
.
screen
.
clear
()
self
.
screen
.
mode
(
"standard"
)
self
.
screen
.
mode
(
"standard"
)
...
@@ -300,24 +298,24 @@ class DemoWindow(object):
...
@@ -300,24 +298,24 @@ class DemoWindow(object):
self
.
state
=
DONE
self
.
state
=
DONE
result
=
"stopped!"
result
=
"stopped!"
if
self
.
state
==
DONE
:
if
self
.
state
==
DONE
:
self
.
configGUI
(
NORMAL
,
NORMAL
,
DISABLED
,
NORMAL
,
self
.
configGUI
(
NORMAL
,
DISABLED
,
NORMAL
,
result
)
result
)
elif
self
.
state
==
EVENTDRIVEN
:
elif
self
.
state
==
EVENTDRIVEN
:
self
.
exitflag
=
True
self
.
exitflag
=
True
self
.
configGUI
(
DISABLED
,
DISABLED
,
NORMAL
,
DISABLED
,
self
.
configGUI
(
DISABLED
,
NORMAL
,
DISABLED
,
"use mouse/keys or STOP"
,
"red"
)
"use mouse/keys or STOP"
,
"red"
)
def
clearCanvas
(
self
):
def
clearCanvas
(
self
):
self
.
refreshCanvas
()
self
.
refreshCanvas
()
self
.
screen
.
_delete
(
"all"
)
self
.
screen
.
_delete
(
"all"
)
self
.
scanvas
.
config
(
cursor
=
""
)
self
.
scanvas
.
config
(
cursor
=
""
)
self
.
configGUI
(
NORMAL
,
NORMAL
,
DISABLED
,
DISABLED
)
self
.
configGUI
(
NORMAL
,
DISABLED
,
DISABLED
)
def
stopIt
(
self
):
def
stopIt
(
self
):
if
self
.
exitflag
:
if
self
.
exitflag
:
self
.
clearCanvas
()
self
.
clearCanvas
()
self
.
exitflag
=
False
self
.
exitflag
=
False
self
.
configGUI
(
NORMAL
,
NORMAL
,
DISABLED
,
DISABLED
,
self
.
configGUI
(
NORMAL
,
DISABLED
,
DISABLED
,
"STOPPED!"
,
"red"
)
"STOPPED!"
,
"red"
)
turtle
.
TurtleScreen
.
_RUNNING
=
False
turtle
.
TurtleScreen
.
_RUNNING
=
False
...
...
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