summaryrefslogtreecommitdiff
path: root/Lib/idlelib/CodeContext.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-09-07 23:31:49 -0500
committerZachary Ware <zachary.ware@gmail.com>2015-09-07 23:31:49 -0500
commita505c27518b3bc7e2c088dd7d4db802956e1155d (patch)
tree965609b9c6b8864cdb7a9eef98a59ef52098b1dc /Lib/idlelib/CodeContext.py
parentdc673a4b24521a8138da1a804ac6506014b234d2 (diff)
parentc04ae2c3aa67fc01f2c7ba093c95a2e7f4eeacc4 (diff)
downloadcpython-a505c27518b3bc7e2c088dd7d4db802956e1155d.tar.gz
Issue #25010: Merge with 3.4
Diffstat (limited to 'Lib/idlelib/CodeContext.py')
-rw-r--r--Lib/idlelib/CodeContext.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py
index 44783b69d0..7d25adaa4c 100644
--- a/Lib/idlelib/CodeContext.py
+++ b/Lib/idlelib/CodeContext.py
@@ -57,18 +57,18 @@ class CodeContext:
# Calculate the border width and horizontal padding required to
# align the context with the text in the main Text widget.
#
- # All values are passed through int(str(<value>)), since some
+ # All values are passed through getint(), since some
# values may be pixel objects, which can't simply be added to ints.
widgets = self.editwin.text, self.editwin.text_frame
# Calculate the required vertical padding
padx = 0
for widget in widgets:
- padx += int(str( widget.pack_info()['padx'] ))
- padx += int(str( widget.cget('padx') ))
+ padx += widget.tk.getint(widget.pack_info()['padx'])
+ padx += widget.tk.getint(widget.cget('padx'))
# Calculate the required border width
border = 0
for widget in widgets:
- border += int(str( widget.cget('border') ))
+ border += widget.tk.getint(widget.cget('border'))
self.label = tkinter.Label(self.editwin.top,
text="\n" * (self.context_depth - 1),
anchor=W, justify=LEFT,