Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Tkinter GUI Application Development Blueprints

You're reading from  Tkinter GUI Application Development Blueprints

Product type Book
Published in Nov 2015
Publisher Packt
ISBN-13 9781785889738
Pages 340 pages
Edition 1st Edition
Languages
Author (1):
Bhaskar Chaudhary Bhaskar Chaudhary
Profile icon Bhaskar Chaudhary

Table of Contents (15) Chapters

Tkinter GUI Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Meet Tkinter 2. Making a Text Editor 3. Programmable Drum Machine 4. A Game of Chess 5. Building an Audio Player 6. Paint Application 7. Multiple Fun Projects 8. Miscellaneous Tips Index

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 as object serialization, lets us convert our object into a string of bytes. The process of reconstructing the object back from the string of bytes is called unpickling or deserialization.

More information about the pickle module is available at http://docs...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}