This is something I intend to add to pytextedit sometime in the future; an terminal embedded in a Python/Tk window. This is ridiculously simple to do; using xterm, all you have to do is get the id of the Frame
it will be embedded in, and use the -into
option.
I’ve only tested this on Linux, currently. (Though I’m almost certain it will work on BSD or other Unix-based systems. Not so certain about OSX [I have no idea if it includes xterm], and I know it won’t work on Windows without Cygwin.) This uses xterm simply because it will be installed on just about every Linux system, and my goal with pytextedit is to have as few dependencies (other than Python and Tk, of course) as possible.
If you’re wondering how having a terminal embedded in a text editor would be useful, I’d implement it the same way Kate does:
Having a terminal in the same window is very useful for coding, as it allows you to test whatever it is you’re doing without needing to have a separate window open (which can get annoying if you have to keep switching between them when you’re trying to edit the code based on some output in the terminal).
This is only semi-related to the rest of this post, but it might be a while before pytextedit 0.2 is finished, due to some problems I’m having setting up tkinter on my Python 3 installation on my new computer. I was going to work on improving and simplifying Unicode support, but I can’t do that without testing in Python 3, and I can’t test in Python 3 without tkinter.