views:

260

answers:

3

I'm looking for a bare bones cross platform editor written in python that I can pick up and customize. The fewer dependencies the better.

Please note: I'm not looking for a python editor or python IDE. Just a no-frills editor, that I can use as a base for an app that I'm starting on.

Must be open source and free to modify for commercial use since I intend to use this for work.

+5  A: 

There is a complete editor written in wxPython here:

http://wiki.wxpython.org/WxHowtoSmallEditor

Only 104 lines, should be easy to customize.

EDIT:

To address some of your requirements, here is a copy and paste from the wxPython wiki:

A GUI Toolkit

wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWindows cross platform GUI library, which is written in C++.

Open Source

Like Python and wxWindows, wxPython is Open Source which means that it is free for anyone to use and the source code is available for anyone to look at and modify. Anyone can contribute fixes or enhancements to the project.

Cross Platform

wxPython is a cross-platform toolkit. This means that with a little care that the same program will run on multiple platforms without modification. Currently supported platforms are Microsoft Windows, and most Unix or unix-like systems with GTK available, and OS X 10.3.9 or above.

Andre Miller
+1: That is very cool.
ire_and_curses
+1  A: 

How about IDLE? IDLE is included in the standard Python distro. From the docs:

"

IDLE has the following features:

  • coded in 100% pure Python, using the tkinter GUI toolkit
  • cross-platform: works on Windows and Unix
  • multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips
  • Python shell window (a.k.a. interactive interpreter)
  • debugger (not complete, but you can set breakpoints, view and step)

"

With some work, you could probably rip out the editor component from IDLE.

Have a look in the idlelib directory of your Python standard library.

codeape
+1  A: 

check out:

Scitilla/SciTE
http://www.scintilla.org/SciTE.html

Editra
http://editra.org/

both are cross platform and written in Python. They are full featured editors, but barebones compared to an IDE or such.

Corey Goldberg
erm, SciTE isn't written in Python...though it is my preferred editorThanks for the link to Editra, though, I'll have to check it out.
Kevin Horn