Ever since I released version 2 of PyTe, I have spent most of my python programming time fixing bugs that I find in him. I eventually got to the point where I just removed most of the problematic code (although many bugs still existed after this also).

While looking through the code I realized that I had removed the object orientated code from version 1. While version 1 wasn’t truly object orientated, it was a good stepping stone towards a decent object orientated editor. So after discovering this, and realizing how stupid of a change removing that code was, I set about writing a basic editor which would be object orientated.

Each tab would be an object, that way keeping track of which file is open is easy because each object keeps track of this on it’s own, all I have to do is grab the filename from the currently visible object, aka: the current tab and it’s editor object. This made setting the tab name, tab icon, and application title easy, the only thing it wouldn’t do sometimes is auto update, so to fix this I added in a small timer which every second makes sure the current tabs and the title are all properly set.

Finally, I added back in auto indentation and auto complete, along with auto selecting which lexer (syntax highlighter) is used according to the file extension.

All this adds up to a small, fairly fast editor which all you have to worry about is clicking one of the following: adding or closing tabs, opening, saving, or saving as files, copy, paste, cut, select all, undo, redo, quit, and about PyTe, and typing your code into the editor.

You can get the source here:

and report any bugs here:

Future tabs (which are easy to write new ones) may include one which graphs data coming in from the usb port, for my robot projects, and possibly a terminal tab, a file browsing and opening tab which might tie in with the editor objects, a tab to create makefiles and compile a C project, and maybe a tab to maybe even submit bugs if I feel so inclined. I may also be adding in a drop down list in which you can change the lexer of the current editor, along with find and replace functions.