Raspberry Pi 3 Cookbook for Python Programmers: Unleash the potential of Raspberry Pi 3 with over 100 recipes Tim Cox instant download
Raspberry Pi 3 Cookbook for Python Programmers: Unleash the potential of Raspberry Pi 3 with over 100 recipes Tim Cox instant download
https://textbookfull.com/product/raspberry-pi-3-cookbook-for-
python-programmers-unleash-the-potential-of-raspberry-pi-3-with-
over-100-recipes-tim-cox/
https://textbookfull.com/product/raspberry-pi-for-python-
programmers-cookbook-second-edition-tim-cox/
https://textbookfull.com/product/electronics-cookbook-practical-
electronic-recipes-with-arduino-raspberry-pi-1st-edition-simon-
monk/
https://textbookfull.com/product/custom-raspberry-pi-interfaces-
design-and-build-hardware-interfaces-for-the-raspberry-pi-gay/
https://textbookfull.com/product/penetration-testing-with-
raspberry-pi-second-edition-mcphee/
Beginning Robotics with Raspberry Pi and Arduino: Using
Python and OpenCV Jeff Cicolani
https://textbookfull.com/product/beginning-robotics-with-
raspberry-pi-and-arduino-using-python-and-opencv-jeff-cicolani/
https://textbookfull.com/product/exploring-raspberry-pi-1st-
edition-molloy/
https://textbookfull.com/product/expanding-your-raspberry-pi-
storage-printing-peripherals-and-network-connections-for-your-
raspberry-pi-1st-edition-mark-edward-soper/
https://textbookfull.com/product/raspberry-pi-for-dummies-3rd-
edition-sean-mcmanus/
https://textbookfull.com/product/python-pygame-and-raspberry-pi-
game-development-2nd-edition-sloan-kelly/
Raspberry Pi 3 Cookbook for
Python Programmers
Third Edition
Tim Cox
Dr. Steven Lawrence Fernandes
BIRMINGHAM - MUMBAI
Raspberry Pi 3 Cookbook for Python
Programmers
Third Edition
Copyright © 2018 Packt Publishing
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
authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to
have been 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-78862-987-4
www.packtpub.com
Dedicated to my loving LORD Jesus Christ for enlightening me with his word
"I will tell you great and hidden things which you have not known"
- Jeremiah 33:3.
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as
well as industry leading tools to help you plan your personal development and advance
your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos
from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
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.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters, and receive exclusive discounts and offers on Packt books and
eBooks.
Contributors
Supporting the vision behind the Raspberry Pi, to encourage a new generation of engineers,
Tim co-founded the MagPi magazine (the official magazine for the Raspberry Pi) and
produces electronic kits through his site PiHardware.com.
The Raspberry Pi community consists of an awesome group of helpful people from all over
the world who were invaluable in researching this book.
Thanks to my family, particularly my wife, Kirsty, who has supported me at every step of
the way and suffered daily due to my obsession with the Raspberry Pi. The excitement that
my daughters, Phoebe and Amelia, have as they discover new things inspires me to share
and teach as much as I can.
Dr. Steven Lawrence Fernandes has Postdoctoral Research experience working in the area
of Deep Learning at The University of Alabama at Birmingham, USA. He has received the
prestigious US award from Society for Design and Process Science for his outstanding
service contributions in 2017 and Young Scientist Award by Vision Group on Science and
Technology in 2014. He has also received Research Grant from The Institution of Engineers.
He has completed his B.E (Electronics and Communication Engineering) and M.Tech
(Microelectronics) and Ph.D. (Computer Vision and Machine Learning). His Ph.D work
Match Composite Sketch with Drone Images has received patent notification (Patent
Application Number: 2983/CHE/2015).
I express my in-depth gratitude to Dr. Murat M. Tanik, Dr. Leon Jololian and Dr. Frank
Skidmore from University of Alabama, Birmingham, for providing me with valuable
guidance. I give a deep thanks to Dr. Manjunath Bhandary, Chairman, Sahyadri College of
Engineering & Management; Dr. Rajinikanth Venkatesan; Mr. Manjunath Hebbar K; and
Ms. Amrita Noronha for providing me with their constant support.
About the reviewers
Ashwin Pajankar is a science popularizer, programmer, author, and YouTuber. He
graduated from IIIT Hyderabad with MTech in computer science engineering. He has been
programming for more than 15 years. He has an interest in promoting science, technology,
engineering, mathematics education, and public understanding of science. He has written
more than a dozen technical books published by Packt, Apress, BPB, and Leanpub. He has
also reviewed four other books for Packt.
Dr. Hong Lin received his PhD in computer science in 1997 from University of Science and
Technology of China. Before joining the University of Houston-Downtown (UHD), he was a
postdoctoral research associate at Purdue University; assistant research officer at National
Research Council, Canada; and engineer at Nokia. He is currently a professor at UHD and
assistant chair of Department of Computer Science and Engineering Technology. He has
edited two books, Empirical Studies of Contemplative Practices and Architectural Design of
Multi-Agent Systems: Technologies and Techniques.
Thanks to Shweta Birwatkar for coordinating the review process of this book.
There's more... 42
Networking directly to a laptop or computer 42
Getting ready 43
How to do it... 48
How it works... 52
There's more... 52
Direct network link 53
See also 53
Networking and connecting your Raspberry Pi to the internet via a
USB Wi-Fi dongle 54
Getting ready 54
How to do it... 55
There's more... 59
Using USB wired network adapters 60
Connecting to the internet through a proxy server 60
Getting ready 60
How to do it... 61
How it works... 62
There's more... 63
Connecting remotely to Raspberry Pi over the network using VNC 63
Getting ready 64
How to do it... 64
There's more... 65
Connecting remotely to Raspberry Pi over the network using SSH
(and X11 forwarding) 66
Getting ready 66
How to do it... 67
How it works... 69
There's more... 70
Running multiple programs with X11 forwarding 70
Running as a desktop with X11 forwarding 70
Running Pygame and Tkinter with X11 forwarding 71
Sharing the home folder of Raspberry Pi with SMB 71
Getting ready 71
How to do it... 71
Keeping Raspberry Pi up to date 73
Getting ready 73
How to do it... 74
There's more... 75
Chapter 2: Dividing Text Data and Building Text Classifiers 77
Introduction 77
Building a text classifier 78
How to do it... 78
How it works... 79
[ ii ]
Table of Contents
See also 80
Pre-processing data using tokenization 80
How to do it... 80
Stemming text data 81
How to do it... 82
Dividing text using chunking 83
How to do it... 83
Building a bag-of-words model 85
How to do it... 85
Applications of text classifiers 88
Chapter 3: Using Python for Automation and Productivity 89
Introduction 89
Using Tkinter to create graphical user interfaces 90
Getting ready 90
How to do it... 92
How it works... 93
Creating a graphical application – Start menu 96
Getting ready 96
How to do it... 96
How it works... 98
There's more... 99
Displaying photo information in an application 101
Getting ready 101
How to do it... 102
How it works... 104
There's more... 107
Organizing your photos automatically 110
Getting ready 111
How to do it... 111
How it works... 113
Chapter 4: Predicting Sentiments in Words 116
Building a Naive Bayes classifier 116
How to do it... 116
See also 118
Logistic regression classifier 118
How to do it... 119
Splitting the dataset for training and testing 120
How to do it... 120
Evaluating the accuracy using cross-validation 122
How to do it... 122
Analyzing the sentiment of a sentence 123
How to do it... 124
Identifying patterns in text using topic modeling 126
[ iii ]
Table of Contents
[ iv ]
Table of Contents
Introduction 192
Getting started with 3D coordinates and vertices 194
Getting ready 194
How to do it... 196
How it works... 199
There's more... 201
Camera 201
Shaders 201
Lights 202
Textures 203
Creating and importing 3D models 203
Getting ready 204
How to do it... 204
How it works... 206
There's more... 206
Creating or loading your own objects 207
Changing the object's textures and .mtl files 208
Taking screenshots 209
Creating a 3D world to explore 209
Getting ready 210
How to do it... 210
How it works... 212
Building 3D maps and mazes 214
Getting ready 215
How to do it... 216
How it works... 220
There's more... 222
The Building module 222
Using SolidObjects to detect collisions 226
Chapter 8: Building Face Detector and Face Recognition Applications 227
Introduction 227
Building a face detector application 227
How to do it... 228
Building a face recognition application 230
How to do it... 230
How it works... 233
See also 234
Applications of a face recognition system 234
Chapter 9: Using Python to Drive Hardware 235
Introduction 235
Controlling an LED 240
Getting ready 240
How to do it... 242
How it works... 243
[v]
Table of Contents
[ vi ]
Table of Contents
[ vii ]
Table of Contents
[ viii ]
Table of Contents
[ ix ]
Table of Contents
[x]
Table of Contents
Chapter 13 505
Chapter 14 505
The software list 506
PC software utilities 506
Raspberry Pi packages 506
Chapter 1 506
Chapter 2 507
Chapter 3 507
Chapter 4 508
Chapter 5 508
Chapter 6 508
Chapter 7 509
Chapter 8 509
Chapter 9 509
Chapter 10 510
Chapter 11 510
Chapter 12 511
Chapter 13 511
Chapter 14 512
There's more... 512
APT commands 512
Pip Python package manager commands 513
Other Books You May Enjoy 514
Index 517
[ xi ]
Preface
This book is intended for anyone who wants to build software applications or hardware
projects using the Raspberry Pi. The book gradually introduces text classification, creating
games, 3D graphics, and sentiment analysis. We also move towards more advanced topics,
such as building computer vision applications, robots, and neural network applications. It
would be ideal to have basic understanding of Python; however, all programming concepts
are explained in detail. All the examples are written using Python 3, with clear and detailed
explanations of how everything works so that you can adapt and use all the information in
your own projects. By the end of the book, you will have the skills you need to build
innovative software applications and hardware projects using the Raspberry Pi.
Chapter 2, Dividing Text Data and Building a Text Classifier, guides us to build a text
classifier; it can classify text using the bag-of-words model.
Chapter 3, Using Python for Automation and Productivity, explains how to use graphical user
interfaces to create your own applications and utilities.
Chapter 4, Predicting Sentiments in Words, explains how Naive Bayes classifiers and logistic
regression classifiers are constructed to analyze the sentiment in words.
Chapter 5, Creating Games and Graphics, explains how to create a drawing application and
graphical games using the Tkinter canvas.
Chapter 6, Detecting Edges and Contours in Images, describes in detail how images are
loaded, displayed, and saved. It provides detailed implementations of erosion and dilation,
image segmentation, histogram equalization, edge detection, detecting corners in images,
and more.
Preface
Chapter 7, Creating 3D Graphics, discusses how we can use the hidden power of the
Raspberry Pi's graphical processing unit to learn about 3D graphics and landscapes, and
produce our very own 3D maze for exploration.
Chapter 8, Building Face Detector and Face Recognition Applications, explains how human
faces can be detected from webcams and recognized using images stored in a database.
Chapter 9, Using Python to Drive Hardware, establishes the fact that to experience the
Raspberry Pi at its best, we really have to use it with our own electronics. This chapter
discusses how to create circuits with LEDs and switches, and how to use them to indicate
the status of a system and provide control. Finally, it shows us how to create our own game
controller, light display, and a persistence-of-vision text display.
Chapter 10, Sensing and Displaying Real-World Data, explains how to use an analog-to-
digital converter to provide sensor readings to the Raspberry Pi. We discover how to store
and graph the data in real time, as well as display it on an LCD text display. Next, we
record the data in a SQL database and display it in our own web server. Finally, we transfer
the data to the internet, which will allow us to view and share the captured data anywhere
in the world.
Chapter 11, Building a Neural Network Module for Optical Character Recognition, introduces
neural network implementation on Raspberry Pi 3. Optical characters are detected,
displayed, and recognized using neural networks.
Chapter 12, Building Robots, takes you through building two different types of robot (a
Rover-Pi and a Pi-Bug), plus driving a servo-based robot arm. We look at motor and servo
control methods, using sensors, and adding a compass sensor for navigation.
Chapter 13, Interfacing with Technology, teaches us how to use the Raspberry Pi to trigger
remote mains sockets, with which we can control household appliances. We learn how to
communicate with the Raspberry Pi over a serial interface and use a smartphone to control
everything using Bluetooth. Finally, we look at creating our own applications to control
USB devices.
Chapter 14, Can I Recommend a Movie for You?, explains how movie recommender systems
are built. It elaborates how Euclidean distance and Pearson correlation scores are computed.
It also explains how similar users are found in the dataset and the movie recommender
module is built.
Appendix, Hardware and Software List, explains the detailed hardware software list used
inside the book.
[2]
Preface
Once the file is downloaded, please make sure that you unzip or extract the folder using the
latest version of:
The code bundle for the book is also hosted on GitHub at https://github.com/
PacktPublishing/Raspberry-Pi-3-Cookbook-for-Python-Programmers-Third-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!
[3]
Preface
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, user input, and Twitter handles. Here is an
example:
"We use the bind function here, which will bind a specific event that occurs on this widget
(the_canvas) to a specific action or key press."
VERT,HOREZ=0,1
xTOP,yTOP = 0,1
xBTM,yBTM = 2,3
MAX_WIDTH,MAX_HEIGHT = 640,480
xSTART,ySTART = 100,200
BALL_SIZE=20
RUNNING=True
Bold: Indicates a new term, an important word, or words that you see onscreen. For
example, words in menus or dialog boxes appear in the text like this. Here is an example:
"Click on the Pair button to begin the pairing process and enter the device's PIN."
[4]
Preface
Sections
In this book, you will find several headings that appear frequently (Getting ready, How to do
it..., How it works..., There's more..., and See also).
To give clear instructions on how to complete a recipe, use these sections as follows:
Getting ready
This section tells you what to expect in the recipe and describes how to set up any software
or any preliminary settings required for the recipe.
How to do it...
This section contains the steps required to follow the recipe.
How it works...
This section usually consists of a detailed explanation of what happened in the previous
section.
There's more...
This section consists of additional information about the recipe in order to make you more
knowledgeable about the recipe.
[5]
Preface
See also
This section provides helpful links to other useful information for the recipe.
Get in touch
Feedback from our readers is always welcome.
General feedback: Email [email protected] and mention the book title in the
subject of your message. If you have questions about any aspect of this book, please email
us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you have found a mistake in this book, we would be grateful if you would
report this to us. Please visit www.packtpub.com/submit-errata, selecting your book,
clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the internet, we
would be grateful if you would provide us with the location address or website name.
Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in
and you are interested in either writing or contributing to a book, please visit
authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on
the site that you purchased it from? Potential readers can then see and use your unbiased
opinion to make purchase decisions, we at Packt can understand what you think about our
products, and our authors can see your feedback on their book. Thank you!
[6]
1
Getting Started with a
Raspberry Pi 3 Computer
In this chapter, we will cover the following recipes:
Introduction
This chapter introduces Raspberry Pi and the process of setting it up for the first time. We
will connect Raspberry Pi to a suitable display, power, and peripherals. We will install an
operating system on an SD card. This is required for the system to boot. Next, we will
ensure that we can connect successfully to the internet through a local network.
Getting Started with a Raspberry Pi 3 Computer Chapter 1
Finally, we will make use of the network to provide ways to remotely connect to and/or
control Raspberry Pi from other computers and devices, as well as to ensure that the system
is kept up to date.
Once you have completed the steps within this chapter, your Raspberry Pi will be ready
for you to use for programming. If you already have your Raspberry Pi set up and running,
ensure that you take a look through the following sections, as there are many helpful tips.
Introducing Raspberry Pi
The Raspberry Pi is a single-board computer created by the Raspberry Pi Foundation, a
charity formed with the primary purpose of re-introducing low-level computer skills to
children in the UK. The aim was to rekindle the microcomputer revolution of the 1980s,
which produced a whole generation of skilled programmers.
Even before the computer was released at the end of February 2012, it was clear that
Raspberry Pi had gained a huge following worldwide and, at the time of writing this book,
has sold over 10 million units. The following image shows several different Raspberry Pi
models:
[8]
Getting Started with a Raspberry Pi 3 Computer Chapter 1
In this book, we will take this little computer, find out how to set it up, and then explore its
capabilities chapter by chapter, using the Python programming language.
Why Python?
It is often asked, "Why has Python been selected as the language to use on Raspberry Pi?"
The fact is that Python is just one of the many programming languages that can be used on
Raspberry Pi.
There are many programming languages that you can choose, from high-level graphical
block programming, such as Scratch, to traditional C, right down to BASIC, and even the
raw machine code assembler. A good programmer often has to be code multilingual to be
able to play to the strengths and weaknesses of each language to best meet the needs of
their desired application. It is useful to understand how different languages (and
programming techniques) try to overcome the challenge of converting what you want into
what you get, as this is what you are trying to do as well while you program.
Python has been selected as a good place to start when learning about programming, as it
provides a rich set of coding tools while still allowing simple programs to be written
without fuss. This allows beginners to gradually be introduced to the concepts and methods
on which modern programming languages are based without requiring them to know it all
from the start. It is very modular with lots of additional libraries that can be imported to
quickly extend the functionality. You will find that, over time, this encourages you to do the
same, and you will want to create your own modules that you can plug into your own
programs, thus taking your first steps into structured programming.
Python addresses formatting and presentation concerns. As indentation will add better
readability, indents matter a lot in Python. They define how blocks of code are grouped
together. Generally, Python is slow; since it is interpreted, it takes time to create a module
while it is running the program. This can be a problem if you need to respond to time-
critical events. However, you can precompile Python or use modules written in other
languages to overcome this.
[9]
Getting Started with a Raspberry Pi 3 Computer Chapter 1
It hides the details; this is both an advantage and a disadvantage. It is excellent for
beginners but can be difficult when you have to second-guess aspects such as datatypes.
However, this in turn forces you to consider all the possibilities, which can be a good thing.
The Python Software Foundation is continuously working to improve and move forward
with the language, which sometimes means they have to sacrifice backward compatibility
to embrace new improvements (and, importantly, remove redundant and legacy ways of
doing things).
There are many tools that will ease the transition from Python 2 to Python
3, including converters such as 2to3, which will parse and update your
code to use Python 3 methods. This process is not perfect, and in some
cases you'll need to manually rewrite sections and fully retest everything.
You can write the code and libraries that will support both. The import
__future__ statement allows you to import the friendly methods of
Python 3 and run them using Python 2.7.
In this book, we have used Python 3.6, which is also compatible with Python 3.5 and 3.3.
[ 10 ]
Other documents randomly have
different content
describe what it was that set my blood boiling. It wasn't his
demoniac chuckling alone, it was everything about him; his manner,
his expression, his extraordinary eyes; one of which looked like the
eye of an infuriated bull, as if it were half inclined to fly out of its
head at you, and the other as if it were the rightful property of the
meekest and mildest of baa-lambs. Then his eye-brows--lapping
over as if they were precipices, and as thick as blacking-brushes.
Then his face, like a little sour and withered apple. Your pro-
indiscriminate-charity men would not have behaved as he did. They
would have asked me. How dare I--how dare I?--yes, that is what
they would have said--How dare I encourage pauperism by giving
money to little boys and girls and ragged men and women, whom I
have never seen in my life before, whom I have never heard of in
my life before? This fellow wasn't one of them. No, no--no, I say, he
wasn't one of them. I wouldn't swear that he wasn't drunk--no, I
won't say that; tipsy, perhaps--no, nor that either. Uncharitable of
me--very. Don't laugh at me. You wouldn't have laughed at the poor
little boy if you had seen him.'
'I daresay, Silver, I daresay. Another man might have thought so;
but I couldn't possibly be angry with him, his manner was so
humble--reproachfully humble. I explained to him that at present I
couldn't afford more, and that, somehow or other, my money melted
away most surprisingly. "I hope, sir," he then said, "that what I was
told of you is not true, and that you are not in the habit of giving
away money indiscriminately." I could not deny it--no, indeed, I
could not deny it--and I commenced to say, hesitatingly (feeling very
guilty), that now and then---- But he interrupted me with, "Now and
then, sir!--now and then! You will pardon my saying so, Mr.
Merrywhistle, but it may not have struck you before that those
persons who give away money indiscriminately are making criminals
for us--are filling our prisons--are blowing a cold blast on manly self-
endeavour--are crippling industry--are paying premiums to idleness,
which is the offspring of the----hem!" And continued in this strain for
more than five minutes. When he went away, my hair stood on end,
and I felt as if sentence ought to be pronounced upon me at once.
And here, this very afternoon, am I caught again by a pitiful face--
you should have seen it! I thought the poor boy would have died as
I looked at him--and I give away a shilling, indiscriminately. Then
comes this strange old fellow staring at me--sneering at me,
shrugging his shoulders at me, and walking away with the
unmistakable declaration--though he didn't declare it in words--that I
wasn't fit to be trusted alone. As perhaps I'm not,--as perhaps I'm
not!' And Mr. Merrywhistle blew his nose violently.
His friends knew him too well to interrupt him. The tea-things had
been quietly cleared away, while he was relieving his feelings. He
had by this time got rid of a great portion of his excitement; and
now, in his cooler mood, he looked round and smiled. At that
moment a lad of about fifteen years of age entered the room. All
their countenances brightened, as also did his, as he entered.
'Well, Charley,' said Mr. Merrywhistle, as the lad, with frank face,
stood before him, 'been knocking anything into "pie" to-day?'
'No, sir,' replied Charley. 'I'm past that now; I'm getting along
handsomely, the overseer said.'
Charley blushed; his ambition had not yet reached that height of
desire, and it seemed almost presumption to him to look so far
ahead. The overseer in the printing-office where Charley was
apprenticed was a great man in Charley's eyes; his word was law to
fifty men and boys. The lad turned to Mr. Silver, and said in a
pleased tone:
'A new apprentice came in today, and swept out the office instead
of me.'
'No, sir, and I'm not sorry for it; and there's something else. Dick
Trueman, you know, sir--'
'You told us, Charley; he was out of his time last week, and they
gave him a frame as a regular journeyman.'
'Dick's wife; she was waiting at the corner of the street for him--
and O, she's Beautiful!'
'Yes, Charley.'
'Only two of the apprentices are asked, and I'm one of them,' said
Charley, with a ring of pardonable pride in his voice. 'May I go?
'Certainly, my boy,' said Mr. Silver. And Mrs. Silver smiled
approvingly, and told Charley to run and wash himself and have tea;
and Charley gave them all a bright look, and went out of the room
as happy a boy as any in all London.
'He's our first and eldest,' said Mrs. Silver, bringing forward a
basket filled with socks and stockings wanting repair; 'he will be a
bright man.'
Then Mary, fourteen years. She looked older than Charley, and,
young as she was, seemed to have assumed a kind of matronship
over the younger branches. That the position was a pleasing one to
her and all of them was evident by the trustful looks that passed
between them.
Then Richard, twelve years; with dancing eyes, open mouth, and
quick, impetuous, sparkling manner--filled with electricity--never still
for a moment together; hands, eyes, and every limb imbued with
restlessness.
Then Rachel, eleven years; with pale face and eyes--so strangely
watchful of every sound, that it might almost have been supposed
she listened with them. She was blind, and unless her attention were
aroused, stood like a statue waiting for the spark of life.
'Mr. Merrywhistle,' she said, and went near to him. He kissed her,
and she went back to her station by the side of Ruth.
Her marriage was one of purest affection, but she was barren;
and after a time, no children coming, she felt a want in her home.
Her husband was secretary in a sound assurance office, and they
possessed means to rear a family. Before their marriage, they had
both dwelt in thought upon the delight and pure pleasure in store for
them, and after their marriage she saw baby-faces in her dreams.
She mused: 'My husband's son will be a good man, like his father,
and we shall train him well, and he will be a pride to us.' And he: 'In
my baby daughter I shall see my wife from her infancy, and I shall
watch her grow to girlhood, to pure womanhood, and shall take
delight in her, for that she is ours, the offspring of our love.' But
these were dreams. No children came; and his wife still dreamt of
her shadow-baby, and yearned to clasp it to her bosom. Years went
on--they had married when they were young--and her yearning was
unsatisfied. Pain entered into her life; a dull envy tormented her,
when she thought of homes made happy by children's prattle, and
her tears flowed easily at the sight of children. Her husband,
engrossed all the day in the duties and anxieties of his business, had
less time to brood over the deprivation, although he mourned it in
his leisure hours; but she, being always at home, and having no
stern labour to divert her thoughts from the sad channel in which
they seemed quite naturally to run, mourned with so intense a grief,
that it took possession of her soul and threatened to make her life
utterly unhappy. One day he awoke to this, and quietly watched her;
saw the wistful looks she cast about her, unaware that she was
being observed; felt tears flowing from her eyes at night. He
questioned her, and learnt that her grief and disappointment were
eating into her heart; that, strive as she would, her life was unhappy
in its loneliness while he was away, and that the sweetest light of
home was wanting.
'I see baby-faces in my dreams,' she said to him one night, 'and
hear baby-voices--so sweet, O, so sweet!' She pressed him in her
arms, and laid his head upon her breast. 'And when I wake, I
grieve.'
'Dear love,' he said, all the tenderness of his nature going out in
his words, 'God wills it so.'
'I know, I know, my love,' she answered, her tears still flowing.
'How can I fill up the void in her life?' he thought, and gave
expression to his thought.
'I have a right to it,' he answered. 'It is not all yours, my dear.
Promise me, you in whom all my life's cares and joys are bound,
never to conceal another of your griefs from me.'
'The poor baby? said Mrs. Silver, when he came from the funeral--
'what will become of it?'
In the middle of the night she told her husband that she had
dreamt of the baby. 'It stretched out its little arms to me.'
They sit round the table, Charley at the head, next to Mrs. Silver;
then come Ruth and Rachel, with hands clasped beneath the
tablecloth; then Mary and Richard. Mr. Silver produces a book; they
hold their breaths. The blind girl knows that the book is on the table,
and her fingers tighten upon Ruth's, and all her ears are in her eyes.
It is a study to watch the varying shades of expression upon her
face. As Mr. Silver opens the book you might hear a pin drop. Ruth
nestles closer to Rachel, and Charley rises in his excitement. Mr.
Merrywhistle sits in the armchair, and as he looks round upon the
happy group, is as happy as the happiest among them. It is the
custom every evening (unless pressing duties intervene) to read a
chapter of a good work of fiction, and the reading-hour is looked
forward to with eager delight by all the children. Last week they
finished the Vicar of Wakefield, and this week they are introduced to
the tender romance of Paul and Virginia. The selection of proper
books is a grave task, and is always left to Mrs. Silver, who
sometimes herself reads aloud.
'Where did we leave off last night, children?' asks Mr. Silver.
'Yes, from her spiteful old aunt,' adds Richard, 'and where Paul
stamps his feet and wants to know who it is that has made Virginia's
mother unhappy.'
They all laugh at this, and Ruth is quite proud, believing that she
has distinguished herself. It is strange to hear the blind girl say, 'I
can see Paul with Virginia in his arms.' And no doubt she can, better
than the others who are blessed with sight. The three grown-up
persons listen and talk among themselves, and now and then join in
the conversation. The clock strikes--nine. It is a cuckoo-clock, and
the children listen to the measured 'Cuckoo! Cuck-oo!' until the
soulless bird, having, with an egregious excess of vanity, asserted
itself nine times as the great 'I am' of all the birds in town or
country, retires into its nest, and sleeps for an hour. Then a chapter
from the Bible and prayers, and in the prayers a few words to the
memory of two--a brother and a sister--who have gone from among
them. For last year they were seven; now they are five. Their faces
grow sad as the memory of their dear brother and sister comes upon
them in their prayers, and 'Poor Archie!' 'Poor Lizzie!' hang upon
their lips. The night's pleasures and duties being ended, the three
youngest children go to bed, the last kind nod and smile being given
to Ruth, sister to poor Blade-o'-Grass, who lingers a moment behind
the others, and with her arm round Rachel's neck, cries 'Cuck-oo!
Cuck-oo!' as her final good-night. But the proud bird in the clock
takes no notice, and preserves a disdainful silence, although Ruth,
as her custom is, waits a moment or two, and listens for the reply
that does not come. Charley and Mary stop up an hour later than the
others, reading; but before that hour expires, Mr. Merrywhistle bids
his friends good-night, and retires.
'If you please, sir!' said the small urchin, for the twentieth time, in
a voice of weak pleading.
'If you please, sir!' repeated the boy, 'will you give me a copper to
buy a bit o' bread?'
'Were you not on the Royal Exchange with a little girl, and didn't I
give you a--a shilling?'
''Aven't 'ad a ounce o' bread in my mouth this blessed day;' and
two large tears gathered in Tom Beadle's eyes. He took care that Mr.
Merrywhistle should see them.
'Gin!' said the old man, expelling the word as if it were a bullet,
and bringing his fierce eye to bear with all its force upon Mr.
Merrywhistle.
The old man took his pipe out of his mouth, and expelled a cloud
and a chuckle at the same moment.
'I thought you was a-comin' to that,' he said. 'You owe me a bob.'
'What for?'
'I made a bet with you--to myself--that the first thing you'd speak
about was the Royal Exchange. I bet you a bob--to myself--and I
won it.'
'You may call it what you like,' said the old man; 'but I call it
beggin'; and so would that identical boy, if I was to ask him. He
wouldn't tell you so, though. The boy he looked as if he was goin' to
die, and you give him a copper or a bit of silver; and you wasn't
pleased because I laughed at you for it. Now, then, fire away.'
'Know him!' replied the old man, with a contemptuous snort; 'I'd
like to be told who it is about 'ere I don't know. And I'd like to know
who you are. I'm almost as fond of askin' questions as I am of
answering 'em. What's sauce for the goose is sauce for the gander.
If you expect Jimmy Wirtue to answer your questions, you must
make up your mind to answer his'n.'
'You're at it agin. No, I'm not Mr. Virtue' (he had to struggle with
the 'V' before it would pass his lips), 'but Jimmy Wirtue--and that's
not Jimmy Wice. What's your'n?'
'You look like it,' chuckled Jimmy Virtue, so tickled by his smart
retort as to be satisfied with Mr. Merrywhistle's vague definition of
his calling. 'We've lots of your sort, too, knockin' about here--more
than the feelanthrofists, I shouldn't wonder. But I don't think there's
any 'arm in you. Jimmy Wirtue's not a bad judge of a face; and he
can tell you every one of your organs. 'Ere's Benevolence--you've got
that large; 'ere's Ideality--not much o' that; 'ere's Language--shut
your eyes; 'ere's Causality--no, it ain't; you 'aven't got it. I can't see
your back bumps, nor the bumps atop o' your 'ead; but I could ferret
out every one of 'em, if I 'ad my fingers there.'
'Nothing that I knows of,' replied Jimmy Virtue; 'he's been goin'
on that way for the last twenty year. If you're lookin' out for
characters, you'll get plenty of 'em 'ere. Perhaps you're a artist for
one of the rubbishy picter-papers--one of the fellers who sees a
murder done in a Whitechapel court one day, and takes a picter of it
on the spot from nater; and who sees a shipwreck in the Atlantic the
next day, and takes a picter of that on the spot from nater. That
there man's worth his ten 'undred golden sovereigns a-year, if he's
worth a penny; and he lives on tuppence a-day. The girls and boys
about here calls him Three-Steps-and-a-Puff. If you was to go and
offer him a ha'penny, he'd take it.'
Mr. Merrywhistle said that he would very much like to come down
and see Jimmy Virtue's place.
'Come along, then,' said Jimmy Virtue, but paused, and said, 'Stop
a bit; perhaps you wouldn't mind buyin' a penn'orth o' baked taters
first.'
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
textbookfull.com