[Lldb-commits] [lldb] r356909 - Python 2/3 compat: tkinter

Serge Guelton via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 25 08:22:41 PDT 2019


Author: serge_sans_paille
Date: Mon Mar 25 08:22:41 2019
New Revision: 356909

URL: http://llvm.org/viewvc/llvm-project?rev=356909&view=rev
Log:
Python 2/3 compat: tkinter

Differential Revision: https://reviews.llvm.org/D59586

Modified:
    lldb/trunk/examples/python/lldbtk.py

Modified: lldb/trunk/examples/python/lldbtk.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/lldbtk.py?rev=356909&r1=356908&r2=356909&view=diff
==============================================================================
--- lldb/trunk/examples/python/lldbtk.py (original)
+++ lldb/trunk/examples/python/lldbtk.py Mon Mar 25 08:22:41 2019
@@ -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):




More information about the lldb-commits mailing list