collections-undo

collections-undo is a general undo/redo framework for Python.

This module makes it easier to record actions and implement undo/redo.

Installation

pip install -U collections-undo

Basic usage

collections-undo uses UndoManager for command registration. UndoManager has several decorators that convert functions into undoable ones. The history of function call is recorded in the UndoManager.

from collections_undo import UndoManager

mgr = UndoManager()

Here are three most practically useful decorators listed up below.

You can merge commands into a single undoable command.

Undo-implemented abstract classes

Python list, dict and set are the fundamental objects of programs. If you can attribute all the operations

Indices and tables