Tkinter GUI Application Development Blueprints, Second Edition - Second Edition
by Bhaskar Chaudhary
Saving beat patterns
In the preceding iteration, we added the capability to define multiple beat patterns.
However, the beat patterns can be played only on a single script run. When the program is closed and restarted, all previous pattern data is lost.
We need a way to persist or store the beat patterns beyond a single program run. We need the ability to store values in some form of file storage and reload, play, and even edit the patterns. We need some form of object persistence.
Python provides several modules for object persistence. The module that we will use for persistence is called the pickle module. Pickle is a standard library of Python.
An object represented as a string of bytes is called a pickle in Python. Pickling, also known ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access