From 6ee3804613b72ef2e14ca99b047611bddb4814ad Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Mon, 25 Mar 2019 15:22:41 +0000 Subject: Python 2/3 compat: tkinter Differential Revision: https://reviews.llvm.org/D59586 llvm-svn: 356909 --- lldb/examples/python/lldbtk.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lldb/examples/python') diff --git a/lldb/examples/python/lldbtk.py b/lldb/examples/python/lldbtk.py index cac969e665e..3734b14f95b 100644 --- a/lldb/examples/python/lldbtk.py +++ b/lldb/examples/python/lldbtk.py @@ -1,10 +1,15 @@ #!/usr/bin/python +from __future__ import print_function import lldb import shlex import sys -from Tkinter import * -import ttk +try: + from tkinter import * + import tkinter.ttk as ttk +except ImportError: + from Tkinter import * + import ttk class ValueTreeItemDelegate(object): -- cgit v1.2.3