summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python/lldbtk.py
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@redhat.com>2019-03-25 15:22:41 +0000
committerSerge Guelton <sguelton@redhat.com>2019-03-25 15:22:41 +0000
commit6ee3804613b72ef2e14ca99b047611bddb4814ad (patch)
treeca7a26d7b5e246b02e9cb7465d49037660ee71c6 /lldb/examples/python/lldbtk.py
parent0bc1447845a2d3d3a766936f99017d6d417c7663 (diff)
downloadbcm5719-llvm-6ee3804613b72ef2e14ca99b047611bddb4814ad.tar.gz
bcm5719-llvm-6ee3804613b72ef2e14ca99b047611bddb4814ad.zip
Python 2/3 compat: tkinter
Differential Revision: https://reviews.llvm.org/D59586 llvm-svn: 356909
Diffstat (limited to 'lldb/examples/python/lldbtk.py')
-rw-r--r--lldb/examples/python/lldbtk.py9
1 files changed, 7 insertions, 2 deletions
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):
OpenPOWER on IntegriCloud