Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4b6ea798
Commit
4b6ea798
authored
Oct 01, 2000
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't rename Tkinter to Tk; closes bug 115714
Subclass Error from Exception.
parent
145f96eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Lib/lib-tk/turtle.py
Lib/lib-tk/turtle.py
+6
-6
No files found.
Lib/lib-tk/turtle.py
View file @
4b6ea798
...
...
@@ -2,8 +2,8 @@
from
math
import
*
# Also for export
import
Tkinter
Tk
=
Tkinter
Error
=
Exception
class
Error
(
Exception
):
pass
class
RawPen
:
...
...
@@ -85,7 +85,7 @@ class RawPen:
# Test the color first
try
:
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`
self
.
_color
=
color
return
...
...
@@ -222,7 +222,7 @@ class RawPen:
self
.
_canvas
.
update
()
self
.
_canvas
.
after
(
10
)
self
.
_canvas
.
itemconfigure
(
item
,
arrow
=
"none"
)
except
Tk
.
TclError
:
except
Tk
inter
.
TclError
:
# Probably the window was closed!
return
else
:
...
...
@@ -242,11 +242,11 @@ class Pen(RawPen):
def
__init__
(
self
):
global
_root
,
_canvas
if
_root
is
None
:
_root
=
Tk
.
Tk
()
_root
=
Tk
inter
.
Tk
()
_root
.
wm_protocol
(
"WM_DELETE_WINDOW"
,
self
.
_destroy
)
if
_canvas
is
None
:
# XXX Should have scroll bars
_canvas
=
Tk
.
Canvas
(
_root
,
background
=
"white"
)
_canvas
=
Tk
inter
.
Canvas
(
_root
,
background
=
"white"
)
_canvas
.
pack
(
expand
=
1
,
fill
=
"both"
)
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