To get the most out of this book
This book is written for developers who work under any operating system for which Python 3 is available.
This is not a book for beginners, so I assume you have Python installed in your environment or know how to install it. Anyway, this book takes into account the fact that not everyone needs to be fully aware of the latest Python features or officially recommended tools. This is why Chapter 2, Modern Python Development Environments provides an overview of recommended techniques and tools (such as virtual environments and pip
) for setting up development environments.
Download the example code files
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Expert-Python-Programming-Fourth-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801071109_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, and user input. Here is an example: "Any attempt to run the code that has such issues will immediately cause the interpreter to fail, raising a SyntaxError exception
."
A block of code is set as follows:
print("hello world")
Any command-line input or output is written as follows:
$ python3 script.py
Some code examples will be representing input of shells. You can recognize them by specific prompt characters:
>>>
for interactive Python shell$
for Bash shell (macOS and Linux)>
for CMD or PowerShell (Windows)
Some code or command-line examples will require providing your own name or values in provided placeholders. Placeholders will be surrounded with <>
characters as in following example:
$ python <my-module-name>
Warnings or important notes appear like this.
Tips and tricks appear like this.