- Tkinter GUI Application Development Blueprints(Second Edition)
- Bhaskar Chaudhary
- 214字
- 2021-06-24 18:35:12
Technical requirements
We will use some more built-in libraries from the standard Python distribution for this chapter. This includes tkinter, os, math, threading, and pickle modules.
To verify that these modules exist, simply run the following statement in your Python3 IDLE interactive prompt:
>>> import tkinter, os, math, time, threading, pickle
This should not cause an error, as Python3 comes with these modules built into the distribution.
Other than this, you need to add an extra Python module called pygame. We will be using the version named 1.9.3 Package, which can be downloaded at http://www.pygame.org/download.shtml.
Linux users may additionally want to take a look at the following page for instructions on getting pygame to work with Python 3.x: http://www.pygame.org/wiki/CompileUbuntu?parent=Compilation.
pygame is a cross-platform package normally used for making games with Python. However, we will just be using a small module from the package named pygame.mixer, which is used for loading and playing sounds. The API documentation for this module can be found at http://www.pygame.org/docs/ref/mixer.html.
After you have installed the module, you can verify it by importing it:
>>> import pygame
>>> pygame.version.ver
If no errors are reported and the version output is 1.9.3, you are ready to program the drum machine. Let's start!
- 深入理解Bootstrap
- 算法基礎:打開程序設計之門
- 跟小海龜學Python
- WSO2 Developer’s Guide
- Functional Programming in JavaScript
- Visual Basic程序設計教程
- C語言從入門到精通(第4版)
- 教孩子學編程:C++入門圖解
- Visual Basic程序設計上機實驗教程
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Scratch·愛編程的藝術家
- 超簡單:用Python讓Excel飛起來(實戰150例)
- Kotlin進階實戰
- 基于GPU加速的計算機視覺編程:使用OpenCV和CUDA實時處理復雜圖像數據
- Mastering Bootstrap 4