Package: idle
Version: 2.5.4-2
Severity: important
Tags: patch
Autocompletion tooltips, which normally popup to describe function
parameters, e.g. after typing: int(<TAB>, don't work properly.
Instead, error occurs and empty window pops up:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1417, in __call__
return self.func(*args)
File "/usr/lib/python2.5/idlelib/MultiCall.py", line 151, in handler
r = l[i](event)
File "/usr/lib/python2.5/idlelib/CallTips.py", line 55, in
try_open_calltip_event
self.open_calltip(False)
File "/usr/lib/python2.5/idlelib/CallTips.py", line 79, in open_calltip
self.calltip.showtip(arg_text, sur_paren[0], sur_paren[1])
File "/usr/lib/python2.5/idlelib/CallTipWindow.py", line 66, in showtip
self.position_window()
File "/usr/lib/python2.5/idlelib/CallTipWindow.py", line 35, in
position_window
self.parencol))
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2860, in bbox
self.tk.call((self._w, 'bbox') + args)) or None
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1033, in _getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(56,'
This is caused by some python2.5 / tk8.5 incompatibility described here:
http://bugs.python.org/issue2693
Following patch fixes the issue:
--- /usr/lib/python2.5/idlelib/WidgetRedirector.py.orig 2009-07-24
18:43:57.000000000 +0200
+++ /usr/lib/python2.5/idlelib/WidgetRedirector.py 2009-07-24
18:49:39.000000000 +0200
@@ -53,7 +53,10 @@
if m:
return m(*args)
else:
- return self.tk.call((self.orig, cmd) + args)
+ result = self.tk.call((self.orig, cmd) + args)
+ if isinstance(result, tuple):
+ result = '{%s}' % '} {'.join(map(str, result))
+ return result
except TclError:
return ""
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages idle depends on:
ii python 2.5.4-2 An interactive high-level object-o
ii python-tk 2.5.2-1.1 Tkinter - Writing Tk applications
idle recommends no packages.
idle suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]