Which Python GUI to use for making a text editor?

I have Python 3.11 on Windows 10 and 11. I know there are plenty of text editors out there but I have some spare time today and wanted to make my own text editor using Python. If I finish it I will give it away, I will not charge for it, as a thank you to all those who helped me over the years.

I am also the author of Editq, which is a text editor from the 1990s. It seems to be completely gone from the internet now.

What is a better GUI framework to use with Python to make a text editor? What are the pros and cons for each?

  1. The primary use will be just for Windows 10+.
  2. I will be having basic functions like selecting text and hit ^B to make it bold, etc.
  3. It will have a recently used file list, cut, copy, paste, undo.
  4. I will support plain text modes, markdown mode, and HTML mode.
  5. I will have custom “snippets” of text for inserting a plain HTML document. Or a minimal Python program. In my snippet definition I want the user to be able to specify where the cursor ends up. So if the snippet to insert is “” I want the cursor to end up in the middle of those HTML tags. So I need cursor control of some sort. I find this cursor positioning after snippet insert to be lacking in Notetab++ and PSPad (which I no longer use due to persistent bugs.)
  6. I will have the ability to sort selected lines for sorting variables or other text.
  7. I will have the ability to sort a single line of text separated by, for example, semicolons. I find this useful sometimes for sorting variables declared on a single line.
  8. It will have the ability to insert system information for use in a forum. Just liked Editq you can configure the editor to get the versions of specific .exe or .dll files on Windows.
  9. I’ll have to implement spell check somehow. I’m not how I would do that for Markdown or HTML modes.
  10. I won’t be able to implement syntax highlighting from scratch, I may have to use a plugin for that.
  11. I’ll be using Python for my regular job so I really don’t want to learn another language like Visual Basic, even if the VB compiler is free. (There used to be a free version of VB out there that didn’t have database support, it was intended for students.)

Thank you!

1 Like

I used PyQt6 for the GUI part of Barry’s Emacs.
It’s cross platform and powerful and can do all you need from the GUI side of things.

PyQt (or PySide) with QScintilla for the text editing seems like a good choice. (Q)Scintilla has a lot of language support out of the box.

1 Like

Exists some projects QT “open source” as this or this