Package peppy
[frames] | no frames]

Package peppy

peppy - (ap)Proximated (X)Emacs Powered by Python.

An experiment using the modern software development process -- this is a wxPython/Scintilla-based editor written in and extensible through Python. It attempts to provide an XEmacs-like multi-window, multi-tabbed interface using the Advanced User Interface (wx.aui) framework of wxPython.

The program is designed around the emacs idea of major modes and minor modes, and further extends this with global plugins. In writing the editor, I also borrowed quite a lot from emacs terminology, including frames and buffers, the minibuffer concept, and the keyboard bindings.

I did not borrow emacs lisp, however; that being the primary reason for me wanting to move away from emacs. I find it easy to think in Python, unlike lisp which my brain can't seem to flush fast enough after learning just enough to hack XEmacs.

Plugins

peppy is extended by plugins. Plugins are based on the yapsy component architecture.

Many parts of the peppy system are exposed through the IPeppyPlugin interface, but most interesting for now are IPeppyPlugin.getMajorModes used to specify the Major Modes provided by the plugin and IPeppyPlugin.getActions to specify the actions that provide the user interface for the major mode.

Major Modes

A major mode is a specialized editing mode that is associated with a type of file. It takes its name from the emacs concept of the same name. A major mode provides the user interface and specialized editing commands to edit a type of file. There are several ways to identify files, one of the most useful being the MIME type of the file. (Major modes can also use other means to identify files that they are capable of operating on, like filename matching and even scanning bytes in the file.)

See the documentation for the MajorMode class for more information on the interface for major mode subclasses, and also instances like FundamentalMode for an example of a mode for general text files, PythonMode for a specific type of text file, and HexEditMode for a major mode that doesn't use a text window as its user interface.

Actions

Peppy uses the term Action to represent any response from the user interface, whether it be from the menu bar, tool bar, or keyboard. The class SelectAction is used as the base class for all the possible actions that the user can perform. Actions are associated with a major mode (or several major modes or the entire application) and can be provided by plugins. They contain a default menu item text, toolbar icon, and keyboard shortcut.

Virtual File System (VFS)

One of the advances used by peppy is the itools virtual filesystem layer, an abstraction of the filesystem that allows for transparent file access whether the file is local to your hard disk, or across the network to a webdav server, an FTP server, or tunnelled over ssh. At least theoretically -- the network stuff isn't available yet, but it will be at some point, and then they'll be able to be transparently integrated with peppy.

Behind the scenes, all file access in peppy is through URLs, although local files are handled as a special case not requiring the leading file:// component.

The virtual filesystem is extensible, but it's currently beyond the scope of this documentation. If you're interested, you can see the TarFS example to see how I implemented a pseudo-filesystem that allows reading individual files from within tar archives without decompressing the whole file first.


Author: Rob McMullen

Version: 0.7.2.5

License: GPL

Submodules

Variables
  __author__ = 'Rob McMullen'
  __author_email__ = 'robm@users.sourceforge.net'
  __codename__ = 'Oscillation Overthruster'
  __description__ = '(ap)Proximated (X)Emacs Powered by Python'
  __download_url__ = 'http://peppy.flipturn.org/archive/'
  __keywords__ = 'text editor, wxwindows, scintilla'
  __url__ = 'http://peppy.flipturn.org/'
  __version__ = '0.7.2.5'