Python Tk Text

  • Text


examples/tk/tk_text.py

import tkinter as tk

app = tk.Tk()
app.title('Text Editor')

text = tk.Text(app)
text.pack({"side": "bottom"})

app.mainloop()
  • text.delete(1.0, tk.END)
  • text.insert('end', content)
  • content = text.get(1.0, tk.END)