Skip to content

Commit c6e4a63

Browse files
committed
[lldb][examples] Remove Python 2 compatibility code in lldbtk.py
The Tkinter module was renamed to tkinter in Python 3.0. https://docs.python.org/2/library/tkinter.html https://docs.python.org/3/library/tkinter.html Rest of it appears to work when imported inside of LLDB: ``` $ ./bin/lldb /tmp/test.o (lldb) target create "/tmp/test.o" Current executable set to '/tmp/test.o' (x86_64). (lldb) b main Breakpoint 1: where = test.o`main + 8 at test.c:1:18, address = 0x0000000000001131 (lldb) run Process 121572 launched: '/tmp/test.o' (x86_64) Process 121572 stopped * thread #1, name = 'test.o', stop reason = breakpoint 1.1 frame #0: 0x0000555555555131 test.o`main at test.c:1:18 -> 1 int main() { int a = 1; char b = '?'; return 0; } (lldb) command script import <...>/llvm-project/lldb/examples/python/lldbtk.py (lldb) tk- Available completions: tk-process -- For more information run 'help tk-process' tk-target -- For more information run 'help tk-target' tk-variables -- For more information run 'help tk-variables' (lldb) tk-process (lldb) tk-target (lldb) tk-variables ```
1 parent 0e02541 commit c6e4a63

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lldb/examples/python/lldbtk.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
import shlex
55
import sys
66

7-
try:
8-
from tkinter import *
9-
import tkinter.ttk as ttk
10-
except ImportError:
11-
from Tkinter import *
12-
import ttk
7+
from tkinter import *
8+
import tkinter.ttk as ttk
139

1410

1511
class ValueTreeItemDelegate(object):

0 commit comments

Comments
 (0)