Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4a34df

Browse files
committed
setupext.py: handle absence of Tkinter.__version__ in python 3
1 parent 6b71371 commit e4a34df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setupext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ def check_for_tk():
764764
if gotit:
765765
try:
766766
tk_v = Tkinter.__version__.split()[-2]
767-
except IndexError:
767+
except (AttributeError, IndexError):
768+
# Tkinter.__version__ has been removed in python 3
768769
tk_v = 'version not identified'
769770
print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" %
770771
(tk_v, Tkinter.TkVersion, Tkinter.TclVersion))

0 commit comments

Comments
 (0)