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
4b6ea798
Kaydet (Commit)
4b6ea798
authored
Eki 01, 2000
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't rename Tkinter to Tk; closes bug 115714
Subclass Error from Exception.
üst
145f96eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
turtle.py
Lib/lib-tk/turtle.py
+6
-6
No files found.
Lib/lib-tk/turtle.py
Dosyayı görüntüle @
4b6ea798
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
from
math
import
*
# Also for export
from
math
import
*
# Also for export
import
Tkinter
import
Tkinter
Tk
=
Tkinter
class
Error
(
Exception
):
Error
=
Exception
pass
class
RawPen
:
class
RawPen
:
...
@@ -85,7 +85,7 @@ class RawPen:
...
@@ -85,7 +85,7 @@ class RawPen:
# Test the color first
# Test the color first
try
:
try
:
id
=
self
.
_canvas
.
create_line
(
0
,
0
,
0
,
0
,
fill
=
color
)
id
=
self
.
_canvas
.
create_line
(
0
,
0
,
0
,
0
,
fill
=
color
)
except
Tk
.
TclError
:
except
Tk
inter
.
TclError
:
raise
Error
,
"bad color string:
%
s"
%
`color`
raise
Error
,
"bad color string:
%
s"
%
`color`
self
.
_color
=
color
self
.
_color
=
color
return
return
...
@@ -222,7 +222,7 @@ class RawPen:
...
@@ -222,7 +222,7 @@ class RawPen:
self
.
_canvas
.
update
()
self
.
_canvas
.
update
()
self
.
_canvas
.
after
(
10
)
self
.
_canvas
.
after
(
10
)
self
.
_canvas
.
itemconfigure
(
item
,
arrow
=
"none"
)
self
.
_canvas
.
itemconfigure
(
item
,
arrow
=
"none"
)
except
Tk
.
TclError
:
except
Tk
inter
.
TclError
:
# Probably the window was closed!
# Probably the window was closed!
return
return
else
:
else
:
...
@@ -242,11 +242,11 @@ class Pen(RawPen):
...
@@ -242,11 +242,11 @@ class Pen(RawPen):
def
__init__
(
self
):
def
__init__
(
self
):
global
_root
,
_canvas
global
_root
,
_canvas
if
_root
is
None
:
if
_root
is
None
:
_root
=
Tk
.
Tk
()
_root
=
Tk
inter
.
Tk
()
_root
.
wm_protocol
(
"WM_DELETE_WINDOW"
,
self
.
_destroy
)
_root
.
wm_protocol
(
"WM_DELETE_WINDOW"
,
self
.
_destroy
)
if
_canvas
is
None
:
if
_canvas
is
None
:
# XXX Should have scroll bars
# XXX Should have scroll bars
_canvas
=
Tk
.
Canvas
(
_root
,
background
=
"white"
)
_canvas
=
Tk
inter
.
Canvas
(
_root
,
background
=
"white"
)
_canvas
.
pack
(
expand
=
1
,
fill
=
"both"
)
_canvas
.
pack
(
expand
=
1
,
fill
=
"both"
)
RawPen
.
__init__
(
self
,
_canvas
)
RawPen
.
__init__
(
self
,
_canvas
)
...
...
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