[Lldb-commits] [PATCH] D59586: Python 2/3 compat: tkinter

Phabricator via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 25 08:21:38 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB356909: Python 2/3 compat: tkinter (authored by serge_sans_paille, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59586?vs=191448&id=192113#toc

Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59586/new/

https://reviews.llvm.org/D59586

Files:
  examples/python/lldbtk.py


Index: examples/python/lldbtk.py
===================================================================
--- examples/python/lldbtk.py
+++ 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):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59586.192113.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190325/fd1d5e4c/attachment-0001.bin>


More information about the lldb-commits mailing list