PDF Getting Started with Python and Raspberry Pi 1st Edition Nixon download
PDF Getting Started with Python and Raspberry Pi 1st Edition Nixon download
https://ebookfinal.com
https://ebookfinal.com/download/getting-started-
with-python-and-raspberry-pi-1st-edition-nixon/
https://ebookfinal.com/download/raspberry-pi-3-cookbook-for-python-
programmers-third-edition-tim-cox/
ebookfinal.com
https://ebookfinal.com/download/raspberry-pi-for-python-programmers-
cookbook-2nd-revised-edition-tim-cox/
ebookfinal.com
https://ebookfinal.com/download/portable-python-projects-run-your-
home-on-a-raspberry-pi-mike-riley/
ebookfinal.com
https://ebookfinal.com/download/learning-raspberry-pi-1st-edition-
shah/
ebookfinal.com
https://ebookfinal.com/download/getting-started-with-java-1st-edition-
jonathan-jackson/
ebookfinal.com
https://ebookfinal.com/download/getting-started-with-neurofeedback-
john-n-demos/
ebookfinal.com
https://ebookfinal.com/download/getting-started-with-grails-second-
edition-scott-davis/
ebookfinal.com
Getting Started with Python and Raspberry Pi 1st
Edition Nixon Digital Instant Download
Author(s): Nixon, Dan
ISBN(s): 9781783551590, 1783551593
Edition: 1
File Details: PDF, 4.62 MB
Year: 2015
Language: english
Getting Started with Python
and Raspberry Pi
Dan Nixon
BIRMINGHAM - MUMBAI
Getting Started with Python and Raspberry Pi
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-78355-159-0
www.packtpub.com
[ FM-2 ]
Credits
[ FM-3 ]
About the Author
Dan Nixon is a software and electronics engineer living in the north of England.
He has past experience of creating software for data analysis, process control, and
business intelligence applications. In most of these projects, Python was one of the
main languages used.
Dan previously authored another book on the uses of the Raspberry Pi, called
Raspberry Pi Blueprints, and has worked on many personal projects that use both
Python and the Raspberry Pi.
[ FM-4 ]
About the Reviewers
Ankit Aggarwal has been fascinated with science and technology since childhood.
He likes to experiment and learn new things. He is a software engineer and
researcher by profession and loves computer science. He wants to solve problems
using technology. His interests include science, technology, academic research,
music, photography, entrepreneurship, DIY, movies, anime, and much more.
In his free time, he reads, takes part in competitive programming, captures photos
of nature with a lens, and watches TV shows, movies, and anime. When he is not
doing these things, he can be found jogging at the nearest ground.
[ FM-5 ]
Yash Gajera is an embedded software engineer at Insignex in Anand, India.
He studied electronics and communication engineering and graduated in 2014
from the A. D. Patel Institute of Technology, Anand. At Insignex, he has worked
on fully automated irrigation control systems. He did his final year project on the
Internet of Things. It was selected as the best project from the EC department at
Gujarat Technological University in 2014. Yash wrote a Python library for the
Zigbee protocol to work with the Raspberry Pi. He also has a lot of experience
in embedded system development and web technologies.
David has been developing software professionally ever since, mainly writing
small and fast code that goes into electronic products, including automated
machinery, electric cars, mobile phones, energy meters, and wireless doorbells.
[ FM-6 ]
These days, he runs his own software consultancy called Thinking Binaries.
He spends much of his time helping design the next wave of the Internet, called
the Internet of Things. This means connecting electronic devices to the Internet.
The rest of the time, he volunteers for The Institution of Engineering and Technology,
running training courses for teachers, designing and running workshops and clubs
for school children, and generally being busy with his Raspberry Pi.
David was the technical editor of the book Adventures in Raspberry Pi. He is a coauthor
of the book Adventures in Minecraft and is the technical editor of the official Raspberry
Pi magazine, the MagPi.
I was really pleased to be asked to review this new book. Dan Nixon
has done an excellent job of getting you started with Python and
your Raspberry Pi, and he presents the material in an easy-to-follow
format. There are lots of fun ideas and building blocks here, which
I hope many readers will extend into bigger and more ambitious
projects of their own.
[ FM-7 ]
www.PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.com
and as a print book customer, you are entitled to a discount on the eBook copy. Get in
touch with us at [email protected] for more details.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
[ FM-8 ]
Table of Contents
Preface v
Chapter 1: Your First Steps with Python on the Pi 1
Installing and setting up Raspbian 2
Writing to the SD card 2
Windows 2
Linux and Mac 4
Booting the Pi for the first time 6
The Python development tools 13
Python 2 versus Python 3 15
Running some simple Python scripts 15
Summary 17
Chapter 2: Understanding Control Flow and Data Types 19
Data in Python 19
Numerical types 21
Operations on numerical types 25
String manipulation 28
String functions 29
String formatting 32
String templates 33
Control flow operators 36
Using functions 39
Summary 42
Chapter 3: Working with Data Structures and I/O 43
Data structures 43
Lists 43
Creating lists 44
List operations 46
[i]
Table of Contents
Dictionaries 48
Creating dictionaries 48
Dictionary operations 49
Sets 51
Set operations 52
Frozen sets 53
Tuples 54
Input/output 55
The os.path module 55
Reading and writing files 57
Summary 58
Chapter 4: Understanding Object-oriented Programming
and Threading 59
Object-oriented programming 59
Classes in Python 61
Operation.py 61
Calculator.py 62
Using the module 63
Inheritance 64
Threading 66
Locks 68
Summary 70
Chapter 5: Packaging Code with setuptools 71
Using packages in your Python code 71
Importing modules 71
Installing modules manually 72
Installing modules using pip 74
Installing modules using apt 75
Packaging your own Python modules 76
Packaging a library 77
Adding an entry point 79
Summary 81
Chapter 6: Accessing the GPIO Pins 83
Digital electronics 84
The GPIO library 85
Single LED output 86
PWM output 87
Multiple outputs 89
Basic switch 90
Switch using interrupt 92
[ ii ]
Table of Contents
[ iii ]
Preface
Preface
The Raspberry Pi is one of the smallest and most affordable single board computers
that has taken over the world of hobby electronics and programming, and the Python
programming language makes this the perfect platform to start coding with.
Getting Started with Python and Raspberry Pi will guide you through the process of
designing, implementing, and debugging your own Python applications to run on
the Raspberry Pi and will help you interact with some of its unique hardware.
Chapter 2, Understanding Control Flow and Data Types, introduces you to the control
flow and conditional execution operations. Also, the basic data types and the
operations that can be performed on them will be covered in this chapter.
Chapter 3, Working with Data Structures and I/O, gives you an overview of the standard
Python data structures (for example, list, dict, and tuple) and how they can be used
within an application. Also, this chapter will provide an introduction to reading and
writing files on the Raspberry Pi's filesystem, including reading from the sysfs to get
data such as the current temperature of the processor.
[v]
Preface
Chapter 5, Packaging Code with setuptools, introduces you to the setup tools in the
Python package, which are used to package Python applications and libraries for
easier installation. This will also include an introduction to the pip utility and PyPi
package repository.
Chapter 6, Accessing the GPIO Pins, gives you an overview of the Python library for
accessing the GPIO pins on the Raspberry Pi and a brief introduction to some basic
electronics needed for the tutorials in the chapter.
Chapter 7, Using the Camera Module, covers using the picamera Python library to
interact with the camera module, the options that can be configured using the
library, and writing a simple application to record a section of video in several
different modes.
Chapter 8, Extracting Data from the Internet, covers the use of several libraries
(including requests and urllib2) to connect to webservers and request data, and
will include obtaining weather forecasts from an online API. Also, you will be
introduced to several third-party libraries that access data from specific sources.
Chapter 10, Debugging Applications with PDB and Log Files, introduces you to the PDB
(Python debugger) tool, discusses how it can be used to diagnose and fix issues in
Python programs, and covers how the logging Python module can be used to capture
information from an application to be used later for debugging. This includes a tutorial
in which code with several issues placed into it will be debugged and corrected.
Chapter 11, Designing Your GUI with Qt, provides an introduction to GUI design with
Qt using Qt Designer and the Python Qt package.
• A Raspberry Pi
• An SD card (4 GB or higher)
[ vi ]
Preface
Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"We can include other contexts through the use of the include directive."
New terms and important words are shown in bold. Words that you see on the
screen, in menus or dialog boxes for example, appear in the text like this: "Next we
will disable the LineEdit widget that will be used for displaying the result of a unit
conversion, this is done by selecting the widget and removing the tick in the enabled
property in the Property Editor as shown in the following screenshot."
[ vii ]
Preface
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for
us to develop titles that you really get the most out of.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you could report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the Errata Submission Form
link, and entering the details of your errata. Once your errata are verified, your
submission will be accepted and the errata will be uploaded to our website or added
to any list of existing errata under the Errata section of that title.
[ viii ]
Preface
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.
We appreciate your help in protecting our authors, and our ability to bring you
valuable content.
Questions
You can contact us at [email protected] if you are having a problem
with any aspect of the book, and we will do our best to address it.
[ ix ]
Your First Steps with
Python on the Pi
In this chapter, we will look at setting up the Raspbian operating system on the
Raspberry Pi and have a quick look at the Python development tools that come
pre-installed on it, along with looking at some basic ways in which we can execute
the Python code.
• A Raspberry Pi
• A USB power source capable of delivering at least 1A
• USB keyboard
• USB mouse
• TV with HDMI port
• An SD card (or microSD card for the model B+ and Pi 2) of at least
4GB capacity
• An SD card reader
• A USB hub (if you wish to connect more USB devices that there are ports
on the Raspberry Pi)
• Optionally, a WiFi adapter if you want to connect the Pi to your network
wirelessly (the list of supported USB WiFi adapters is available at
elinux.org/RPi_USB_Wi-Fi_Adapters)
[1]
Your First Steps with Python on the Pi
1. On the downloads page select the Download ZIP option under RASPBIAN.
2. Once the file has downloaded, extract the Zip archive using the default
tool on your OS. You should now have a single file ending with the file
extension .img.
Windows
On Windows, we will use a tool called Win32 Disk Imager to write the OS
image to the SD card. This tool can be downloaded from the SourceForge page
at sourceforge.net/projects/win32diskimager.
1. Once downloaded and installed, insert your SD card and open Win32 Disk
Imager. You should see a window similar to the following screenshot:
[2]
Chapter 1
The important thing to check is that a drive letter appears in the Device
drop down list. If this does not happen then Win32 Disk Imager has failed
to recognize your SD card. In such a case, try it in a different SD card reader.
If it still does not work then it could indicate that the card has failed.
2. Next, browse to select the .img file you had previously extracted from
the downloaded Zip archive and click the Write button as shown in the
following screenshot, after first making sure that the correct device is
selected in the Device drop down list:
3. You will then see a confirmation dialog similar to the one shown in the next
screenshot, asking you to confirm that the image and device are correct.
Assuming they are, click on Yes.
[3]
Your First Steps with Python on the Pi
4. Win32 Disk Imager will now write the image file to the SD card. This can
take a few minutes. Once complete, you will see a confirmation dialog box
as seen in the following screenshot:
You now have Raspbian loaded on the SD card and can now move on to the Boot Pi
for the first time. This will be covered in the following sections.
1. First, we need to determine the path to the storage device you want to write
to. On Linux, the easiest way to do this is by using the udev management
tool to monitor the udev logs. This is done by using the following command:
udevadm monitor --udev
2. Now insert the SD card and you should see a series of log messages printed
to the console, similar to those shown in the following image. The last few
should contain the paths to the partitions already on the drive (in my case,
/dev/sdb1 and /dev/sdb2; from this we can deduce that the path to the
SD card is /dev/sdb).
[4]
Chapter 1
3. Next, we need to ensure that none of the existing partitions are mounted
before we try to write to the SD card. This can be done by running the
following command for every partition discovered using udevadm:
umount PATH
Here PATH is the path to the partition. This should give an output similar
to the following image if the partition was not mounted; otherwise the
command will exit without printing any output:
[5]
Your First Steps with Python on the Pi
4. At this point, the SD card is ready to be written to. For this we will use the
following command:
sudo dd if=[path to .img] of=[path to SD]
Here [path to .img] is the path to the .img file extracted from the Zip
archive downloaded earlier and [path to SD] is the path to the SD card
we just discovered.
This process will take some time (up to 20 minutes) and is complete when
the command exits and you see the next shell prompt as shown in the
following screenshot. If the writing fails then an error message will be
printed to the terminal.
Note that to fully setup the Pi, you will need to have a way to connect it to the
internet in order to install and update the software packages. This can either be
wired (using an Ethernet cable) or wireless (using a USB WiFi adapter).
1. Firstly, connect the mouse, keyboard, monitor, and either the WiFi adapter
or the Ethernet cable to the Pi. Insert the SD card and connect a USB power
source. You should see the red PWR LED (Light Emitting Diode) light up
and shortly after that, the green ACT LED would start to blink.
Note that the USB power source should be able to supply at least 1.5A to
ensure reliable operation of the Pi. Usually, the USB chargers supplied with
the tablets are a good choice of power supply.
[6]
Chapter 1
2. Once the Pi has booted, you will see the configuration utility as shown in the
following screenshot. The first thing we need to do here is to expand the root
partition on the SD card to fill the entire SD card. This ensures that we have the
maximum space available once we start using the Pi. This is done by selecting
the Expand Filesystem option at the top of the list and pressing Enter.
3. Once the filesystem has been modified, you will see a message similar to the
one shown next. Press Enter to return to the main menu.
4. Next, we will change the password for the default Pi user. This is done
by selecting the second option on the main menu, Change User Password,
and pressing Enter.
[7]
Your First Steps with Python on the Pi
5. You will now see a message box similar to the one shown next, with
instructions on entering a new password. Press Enter to continue.
6. You will now be required to enter a new password. Press Enter when
finished. Once you have done this, you will be asked to enter the password
again to confirm.
Note that when entering a password you will not see any
characters appear on the screen.
7. Now that the password has been changed, we need to set the default boot
action to start LXDE, the desktop manager used on Raspbian. Select Enable
Boot to Desktop/Scratch and press Enter.
[8]
Chapter 1
9. You may also wish to change the default locale using the Internationalisation
Options menu option. By default, the Pi is configured for the UK.
10. Once you are ready to reboot the Pi to apply all of the new settings. This is
done by selecting the Finish option and pressing Enter.
11. You will be asked for a confirmation that you want to reboot. Select Yes and
press Enter.
[9]
Your First Steps with Python on the Pi
12. If you are using Ethernet to connect to your network then you can skip
this step. Otherwise, we will now setup the WiFi adapter and connect to
a wireless network.
1. Open wpa_gui by choosing the WiFi Configuration utility in the
Preferences submenu from the main menu in Raspbian.
[ 10 ]
Chapter 1
3. When the scan completes, double click on the WiFi network you wish
to connect to and you will be shown a window similar to the one in the
following image, with some of the details of the network filled in:
[ 11 ]
www.allitebooks.com
Your First Steps with Python on the Pi
13. Now that we have an internet connection on the Pi, the final setup is to
update the software packages already installed on the Pi. This can be done
by opening a terminal, by clicking on the black monitor in the top left corner
of the screen and typing the following commands:
sudo apt-get update
sudo apt-get upgrade
Each of these commands will take a few minutes to execute. The first updates
the list of the available packages and the second updates each of the installed
packages to the latest version.
Now that we have Raspbian setup on the Pi, we can move on to having a look at
some of the tools we can use to write and execute Python scripts on the Pi.
[ 12 ]
Chapter 1
We will first look at the interactive terminal. First open a terminal by clicking on
the black monitor icon in the top right corner of the desktop. This will open an
LXTerminal window. In this window, type python and press Enter. This will start
the interactive terminal as shown in the following screenshot:
From here we can type the Python code line by line; each line is executed as soon as
it is typed, making this tool useful for quick testing and debugging (I also find that
it makes a nice command line calculator). To demonstrate this, type in the following
code and press Enter:
print "Hello, world!"
[ 13 ]
Your First Steps with Python on the Pi
This will print the test Hello, world! on the line next to where you typed it in,
as shown in the following screenshot:
The python executable can also be used to run the existing Python script files
(which have the .py file extension), which we will look at later in the chapter.
When first opened, it will be in the interactive terminal mode and can be used
in the same way as the terminal ran from the command line, as shown in the
following screenshot:
[ 14 ]
Chapter 1
For this reason, we will only use Python 2.7 in this book as this has the widest library
support and is still the default Python version on many operating systems.
1. First open IDLE and select New Window from the File menu, as shown in
the following screenshot. This will open a new text editor window which
will allow you to write and edit the script files.
[ 15 ]
Your First Steps with Python on the Pi
2. Now type the following code into the editor. This is a simple script that
imports the time module and prints a string containing the current time
to the terminal.
import time
print "The current time is: " + time.ctime()
3. Save the file as time.py in the home directory by selecting Save from the
File menu.
Now that the script is saved, we can execute it using the Python executable
at the command line.
5. Go back to the Python script in IDLE and add the following line as the very
first line in the file:
#!/usr/bin/env python
7. Now we are able to execute the script using the following command:
./time.py
[ 16 ]
Chapter 1
Summary
In this chapter, we looked at getting the Pi set up and running using the Raspbian
operating system, and went through the Python development tools and the differences
between the Python versions.
We also looked at our first snippets of Python code and the different ways that Python
can be executed.
In the next chapter, we will focus more on the fundamentals of Python programming
when we look at control flow operations, multiple data types, and the operations
they support.
[ 17 ]
Understanding Control Flow
and Data Types
Now that we are able to run Python code, we will take a look at some of the ways in
which we can store data and control the flow of execution through the Python code.
As mentioned earlier, all the code used in this chapter is written for Python 2.7,
and is able to be executed on any Python 2.7 interpreter.
Data in Python
Before jumping to the various data types that are available in Python, it is worth
noting that Python is a strong dynamically typed programming language, which
means both that:
• Once a variable (a unit of stored data in a program) has been given a value,
its type is set and will not change until the variable is assigned a value of a
different type (strong)
• A variable can hold a value of any type as the type is given by the value,
not the variable itself (dynamic)
[ 19 ]
Understanding Control Flow and Data Types
This is best explained with an example that can be executed from the interactive
console, assuming we have a variable representing a string:
flan = "flan"
We can query the value held by the variable and the type using the following
code (note that this will only work on an interactive console as return values are
automatically printed to the terminal):
flan
type(flan)
As the following output shows, the variable is of type str which represents a string
in Python:
We can now reassign the variable to a new numerical value and check the type as
done earlier:
flan = 495
flan
type(flan)
Now when we check the type, we see the type has changed to type int, the type
used to store an integer value.
You can also use the isinstance() function to test if a variable holds a value of a
given type, as demonstrated in the following image:
[ 20 ]
Chapter 2
Certain types can be converted by using the type name as a function, as shown in the
following example:
flan = "495"
flan
type(flan)
flan_i = int(flan)
flan_i
type(flan_i)
As the output shows, this converts the original value of the flan variable to an
integer based on the contents of the string:
Numerical types
Python has several different numerical types built in that allow you to represent
integer, floating point, and complex numbers using the following types:
• int: The plain integer type, this has at least 32 bits of precision but is
limited by the architecture of the system
• long: This behaves in the same way as int but has unlimited precision
• float: Floating point numbers
• complex: Complex numbers
There are a range of ways to define a numerical value in Python. Typically, this
can be done by typing the standard representation of a number as shown in the
following example:
a = 42
type(a)
b = 0.009
type(b)
c = 10000000000
type(c)
[ 21 ]
Random documents with unrelated
content Scribd suggests to you:
of the gentlemen who have stayed here during the past year, say, so
we can look up their servants.”
“I can tell you offhand of several of my guests but it will take more
time than I can spare this afternoon to give you a complete list, and
frankly, it is distasteful to me to have my friends annoyed.” Orbit’s
tone was pleasant but firm. “The latest to visit me, whom I can recall,
are Professor Harrowden, from the Smithsonian Institute, Sir Philip
Devereux and Conan Fairclough of London, Sabatiano Maura,
Yareslow Gazdik—”
“Mr. Orbit, would you write the last two?” McCarty interrupted
earnestly. “Where might Professor Harrowden be found?”
“In South America just now, leading an expedition up the Amazon.”
Orbit laid his cigarette in a tray of curiously hammered red gold and
reached obligingly for a pen. “Fairclough’s off for Africa again, I
believe, and Gazdik is playing a series of concerts at Biarritz.”
“Are the others at the ends of the earth, too?” The question was
bland, but McCarty’s smile was a trifle grim.
“Oh, no!” Orbit smiled also in understanding, as he rose and
offered the sheet of paper. “Sir Philip is on his way here from the
West to visit me again for a few days and Maura’s portrait exhibition
closes in Philadelphia before the end of the month when he, too, will
return before sailing again for Madrid. I’ll send the complete list to
headquarters for you, but I’m afraid you won’t find that their
menservants learned much of Hughes’ affairs in the brief time they
were here.”
McCarty thanked him and they took their departure, encountering
Ching Lee in the hall below who showed them out in silence.
“’Tis beyond me what you got out of that interview,” Dennis
declared. “Stalling, is what I’d have called it!”
“The two of us!” McCarty agreed with a chuckle. “Him as well as
me. He’ll not be dragging his friends into this business if he can help
it!... Who’s the lanky, worried-looking guy talking to Bill?”
Halfway down the block, a tall, thin, bespectacled young man was
gesticulating nervously as he confronted the watchman whose
vehement shakes of the head denoted protestation. While they
watched, the young man turned abruptly and made for the Goddard
house. Bill advanced slowly toward them.
“Have you fellows seen the Goddard boy?” he asked. “He’s the
red-headed kid you saw me let in the first day you came. That was
his private teacher who’s been looking for him for an hour but he
didn’t go out either of the gates.”
“Maybe he did awhile back when that one was left open,” McCarty
suggested dryly.
“Good Lord, did you know that!” Bill gasped. “If you let on it’ll cost
me my job, and I only stepped ’round the corner for a smoke! The
kid’s all right, but they treat him like a baby. Did you find out yet who
killed Hughes?”
“We’re waiting for news every minute,” McCarty assured him
gravely as they reached the western gate. “I shouldn’t wonder if it
came to-night.”
“Now what in the world did you give him that bunk for?” demanded
Dennis, when they had left the Mall safely behind them.
“I said ‘news,’ but not of what kind, Denny,” replied his companion
with dignity. “You’re not on duty till morning?”
“No, I was thinking I’d drop in at Molly’s, now the kid has got over
the measles.”
“Well, come to my rooms when you leave your sister’s,” McCarty
invited. “I’ve accepted a bribe from one of my Homevale tenants,
who’s law-breaking in his cellar, and if you’re not afraid of being
poisoned like Hughes——?”
“I’ll be there!” Dennis promised with alacrity.
He was as good as his word but when he arrived no refreshment
awaited him. Instead, McCarty turned from the telephone with a glint
of latent excitement in his blue eyes and announced:
“The news has come, Denny. Horace Goddard has been
kidnapped!”
CHAPTER IX
IN THIN AIR
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com