Summary

With the end of this chapter, and the end of our blackjack project as a whole, we now know how to add animations to a Tkinter project by making use of the powerful Canvas widget and its methods, such as create_image, create_text, move, and update. We know how to control their frame rate with the use of Tkinter's after method and how to block other functions until the animation is finished with a while loop.

Adding sound into a project has been made very easy by the use of the pygame library. Although the package we made for this chapter used casino-specific sounds, we have learned enough about reusability in order to create a sound collection package for any type of game and application, all we need is the audio files.

By looking into Python's packaging system, we have learned how to import and use other pieces of code within an application – both code written by us and external libraries. The advantages and dangers of specific import styles have been demonstrated so that we know how to balance conciseness of code with safety from accidentally editing things we should not.

Python's virtual environments have been explored and practiced so that we can consider portability of our applications as a whole, ensuring anybody who has the code will also have a list of its dependencies and the correct Python interpreter to go along with it.

In the next chapter, we will begin a new project—a text editor that handles syntax highlighting. With this project, we will be learning all about Tkinter's powerful Text widget, as well as general concepts of event handling and tagging.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset