Before we move any further, let's go through a number of specifications regarding how to set up the necessary tools that you will be using throughout this book. In particular, we will discuss the process of obtaining a Python distribution for your system and an appropriate development environment, as well as how to download the code used in the examples included in the chapters of this book.
Setting up your Python environment
General setup
Let's look at the process of obtaining a Python distribution for your system and an appropriate development environment:
- Any developer can obtain their own Python distribution from https://www.python.org/downloads/.
- Even though both Python 2 and Python 3 are being supported and maintained, throughout this book we will be using Python 3.
- The choice of an integrated development environment (IDE) is flexible for this book. Although it is technically possible to develop Python applications using a minimal text editor, such as Notepad or TextEdit, it is usually much easier to read and write code with IDEs designed specifically for Python. These include IDLE (https://docs.python.org/3/library/idle.html), PyCharm (https://www.jetbrains.com/pycharm/), Sublime Text (https://www.sublimetext.com/), and Atom (https://atom.io/).
Downloading example code
To obtain the code used throughout this book, you can download a repository from GitHub, which includes all of the example and project code covered in this book:
- First, visit https://github.com/PacktPublishing/Mastering-Concurrency-in-Python.
- To download the repository, simply click on the Clone or download button in the top right corner of your window. Choose Download ZIP to download the compressed repository to your computer:
Click on Download ZIP to download the repository
- Uncompress the downloaded file to create the folder that we are looking for. The folder should have the name Mastering-Concurrency-in-Python.
Separate folders, titled ChapterXX, are inside the folder, indicating the chapter that covers the code in that folder. For example, the Chapter03 folder contains the example and project code covered in Chapter 3, Working with Threads in Python. In each subfolder, there are various Python scripts; as you go through each code example in the book, you will know which script to run at a specific point in each chapter.