Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
2K views65 pages

Download Kivy : interactive applications and games in Python : create responsive cross-platform UI/UX applications and games in Python using the open source Kivy library Second Edition Roberto Ulloa ebook All Chapters PDF

responsive

Uploaded by

suingbaarsod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
2K views65 pages

Download Kivy : interactive applications and games in Python : create responsive cross-platform UI/UX applications and games in Python using the open source Kivy library Second Edition Roberto Ulloa ebook All Chapters PDF

responsive

Uploaded by

suingbaarsod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 65

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Kivy : interactive applications and games in


Python : create responsive cross-platform UI/UX
applications and games in Python using the open
source Kivy library Second Edition Roberto Ulloa
https://textbookfull.com/product/kivy-interactive-
applications-and-games-in-python-create-responsive-cross-
platform-ui-ux-applications-and-games-in-python-using-the-
open-source-kivy-library-second-edition-roberto-ulloa/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Godot 4 Game Development Projects: Build five cross-


platform 2D and 3D games using one of the most powerful
open source game engines 2nd Edition --
https://textbookfull.com/product/godot-4-game-development-projects-
build-five-cross-platform-2d-and-3d-games-using-one-of-the-most-
powerful-open-source-game-engines-2nd-edition/
textboxfull.com

Coding Games in Python 1st Edition Carol Vorderman

https://textbookfull.com/product/coding-games-in-python-1st-edition-
carol-vorderman/

textboxfull.com

Create GUI Applications with Python Qt5 PySide2 Edition


Martin Fitzpatrick

https://textbookfull.com/product/create-gui-applications-with-python-
qt5-pyside2-edition-martin-fitzpatrick/

textboxfull.com

Create Gui Applications with Python Qt5 4th Edition Martin


Fitzpack

https://textbookfull.com/product/create-gui-applications-with-python-
qt5-4th-edition-martin-fitzpack/

textboxfull.com
Invent Your Own Computer Games with Python Al Sweigart

https://textbookfull.com/product/invent-your-own-computer-games-with-
python-al-sweigart/

textboxfull.com

Learning Advanced Python by Studying Open Source Projects


1st Edition Li

https://textbookfull.com/product/learning-advanced-python-by-studying-
open-source-projects-1st-edition-li/

textboxfull.com

Mastering Qt 5 Create stunning cross platform applications


using C with Qt Widgets and QML with Qt Quick 2nd Edition
Guillaume Lazar
https://textbookfull.com/product/mastering-qt-5-create-stunning-cross-
platform-applications-using-c-with-qt-widgets-and-qml-with-qt-
quick-2nd-edition-guillaume-lazar/
textboxfull.com

Understanding Kids, Play, and Interactive Design :How to


Create Games Children Love 1st Edition Mark Schlichting

https://textbookfull.com/product/understanding-kids-play-and-
interactive-design-how-to-create-games-children-love-1st-edition-mark-
schlichting/
textboxfull.com

A Python Data Analyst’s Toolkit: Learn Python and Python-


based Libraries with Applications in Data Analysis and
Statistics Gayathri Rajagopalan
https://textbookfull.com/product/a-python-data-analysts-toolkit-learn-
python-and-python-based-libraries-with-applications-in-data-analysis-
and-statistics-gayathri-rajagopalan/
textboxfull.com
[1]
Kivy – Interactive Applications
and Games in Python
Second Edition

Create responsive cross-platform UI/UX applications


and games in Python using the open source Kivy library

Roberto Ulloa

BIRMINGHAM - MUMBAI
Kivy – Interactive Applications and Games in Python
Second Edition

Copyright © 2015 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 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.

First published: September 2013

Second edition: June 2015

Production reference: 1240615

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78528-692-6

www.packtpub.com
Credits

Author Project Coordinator


Roberto Ulloa Suzanne Coutinho

Reviewers Proofreader
Takumi Adachi Safis Editing
Philip Bjorge
Joe Dorocak Indexer
Priya Sane
Vijay Mahrra
Edward C. Delaporte V
Graphics
Sheetal Aute
Commissioning Editor
Disha Haria
Nadeem N. Bagban
Jason Monteiro

Acquisition Editor
Nikhil Karkal Production Coordinator
Nitesh Thakur

Content Development Editor


Amey Varangaonkar Cover Work
Nitesh Thakur

Technical Editor
Ankur Ghiye

Copy Editor
Adithi Shetty
About the Author

Roberto Ulloa has a diverse academic record in multiple disciplines within


the field of computer science. Currently, he is working with artificial societies
as part of his PhD thesis at the University of Western Ontario. He obtained an
MSc degree from the University of Costa Rica and taught programming and
computer networking there. He has earned a living as a web developer, working
with Python/Django and PHP/Wordpress. He collaborates with various researchers
while also working on his own projects, including his blog (http://robertour.
com). He constantly worries that the Internet has already become aware of itself and
that we are not able to communicate with it because of the improbability of it being
able to speak any of the 6,000-plus odd human languages that exist on the planet.

I would like to thank Celina for supporting me in all my adventures,


in particular, this book. I am very grateful for the valuable
contributions and feedback of the Packt Publishing team, the editors,
and the reviewers. Also, I would like to thank all those people who
made the previous edition possible. Their ideas and encouragement
made that edition a success, which is why I have now been given the
opportunity to update and expand it with this second edition.
About the Reviewers

Takumi Adachi is an avid user and programmer of web and mobile


applications. His strong points include HTML/CSS, JavaScript and its many
frameworks and libraries, and Android development. He has also contributed
a little to Kivy Blueprints, Mark Vasilkov, Packt Publishing.

I want to thank my family, friends, Justin, and my past and present


employers for helping me get to where I am today.

Philip Bjorge is a full-stack developer who has worked on projects for health,
amusement parks, academics, and high-tech industries. Prior to joining Substantial,
a Seattle-based software design agency, he worked on the Xbox Music and Video
team at Microsoft. Most notably, he was a developer for Surface Music Kit, an app
that was featured at the Surface 2 press conference unveiling and was on display in
Microsoft stores nationwide.
Joe Dorocak, whose Internet moniker is Joe Codeswell, is a very experienced
programmer. He enjoys creating readable code that implements project requirements
efficiently and in a manner that can be easily understood. He considers writing code
akin to writing poetry. He crafts his code so it acts as communication, not only with
the machine platforms on which it runs, but also with the human programmers who
will read it in the future.

Joe has been employed directly and also in a contractual role by start-ups and by
many major top-shelf companies, including IBM, HP, and GTE/Sprint.

Joe is presently concentrating on application and web project consulting using


languages, frameworks, and tools and techniques, including Python, JavaScript,
web2py, Cython, memoization, and other performance enhancement techniques.
For more details on him, please visit https://www.linkedin.com/in/joedorocak.

Joe has also worked on Kivy Blueprints by Mark Vasilko and Functional Programming
in JavaScript by Dan Mantyla.

I am very grateful to Suzanne Coutinho and Nidhi Joshi of Packt


Publishing. They have always coordinated my efforts wisely,
professionally, and with a consistent human touch.
Vijay Mahrra is an experienced system administrator, developer, and programmer
with over 20 years of experience from the very early days of the Web to the present
day, contributing his knowledge and experience to various free and open source
projects along the way.

You can find out more about him at http://about.me/vijay.mahrra

A big thank you to my mother, Nirmal; niece, Shreya; and everyone


at Packt Publishing. Thanks to Matt Saunders and Neil Levine for all
the years of hosting.

Edward C. Delaporte V has been creating and using software since the
mid 1980s.

Edward wants to thank all of the software developers who wrote


the code he learned from, especially those who took the time to also
write about their code, how to program, and how to program well.
www.PacktPub.com

Support files, eBooks, discount offers, and more


For support files and downloads related to your book, please visit 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 service@packtpub.com 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.
TM

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

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
Table of Contents
Preface iii
Chapter 1: GUI Basics – Building an Interface 1
Basic interface – Hello World! 3
Basic widgets – labels and buttons 7
Layouts 10
Embedding layouts 16
PageLayout – swiping pages 19
Our project – Comic Creator 22
Summary 29
Chapter 2: Graphics – the Canvas 31
Understanding the canvas 32
Drawing basic shapes 33
Adding images, colors, and backgrounds 41
Structuring graphic instructions 42
Rotating, translating, and scaling the coordinate space 44
Comic Creator: PushMatrix and PopMatrix 47
Summary 53
Chapter 3: Widget Events – Binding Actions 55
Attributes, ID, and root 56
Basic widget events – dragging the stickman 58
Localizing coordinates – adding stickmen 65
Binding and unbinding events – sizing limbs and heads 69
Binding events in the Kivy language 74
Creating your own events – the magical properties 77
Kivy and its properties 80
Summary 84

[i]
Table of Contents

Chapter 4: Improving the User Experience 85


ScreenManager – selecting colors for the figures 86
Color control on the canvas – coloring figures 89
StencilView – limiting the drawing space 93
Scatter – multi-touching to drag, rotate, and scale 95
Recording gestures – line, circle, and cross 99
Recognizing gestures – drawing with the finger 101
Behaviors – enhancing widget's functionality 107
Style – decorating the interface 109
Factory – replacing a vertex instruction 111
Summary 113
Chapter 5: Invaders Revenge – an Interactive
Multi-touch Game 115
Invaders Revenge – an animated multi-touch game 116
Atlas – An efficient management of images 118
Boom – simple sound effects 120
Ammo – simple animation 120
Invader – transitions for animations 122
Dock – automatic binding in the Kivy language 125
Fleet – infinite concatenation of animations 126
Scheduling events with the clock 128
Shooter – multi-touch control 130
Invasion – moving the shooter with the keyboard 134
Combining animations with '+' and '&' 136
Summary 138
Chapter 6: Kivy Player – a TED Video Streamer 141
Video – play, pause, and stop 142
AsyncImage – creating a cover for the video 146
Subtitles – tracking the video progression 149
Control bar – adding buttons to control the video 153
Slider – including a progression bar 157
Animation – hiding a widget 159
Kivy inspector – debugging interfaces 161
ActionBar – a responsive bar 163
LoadDialog – displaying a directory of files 168
ScrollView – displaying a list of videos 171
Search – query the TED Developer API 176
Summary 177
Index 179

[ ii ]
Preface
Mobile devices have transformed the way applications are perceived. They
have increased in interaction types; the user now expects gestures, multi-touches,
animations, responsiveness, virtual keyboards, and magic-pens. Moreover,
compatibility has become a must if you want to avoid the barriers imposed by
major operating systems. Kivy is an open source Python solution that covers these
market needs with an easy-to-learn and rapid development approach. Kivy continues
to grow fast and two versions have been released since the first publication of this
book in September 2013. Thanks to an enthusiastic community, Kivy is making its way
in an extremely competitive territory in which it stands out for offering both a cross-
platform and efficient alternative to native development and HTML5.

This book introduces you to the Kivy world, covering a large variety of important
topics related to interactive applications and games development. The components
presented in this book were selected according to their usefulness for developing
state-of-art applications and also for serving as an example of broader Kivy
functionalities. Following this approach, the book covers a big part of the
Kivy library.

This book provides you with examples to understand their use and how to
integrate the three projects that come with this book. The first one, the comic
creator, exemplifies how to build a user interface (Chapter 1, GUI Basics – Building
an Interface), how to draw vector shapes in the screen (Chapter 2, Graphics – the
Canvas), how to bind user interactions with pieces codes (Chapter 3, Widget Events
– Binding Actions), and other components related to improving the user experience
(Chapter 4, Improving the User Experience). The second project, Invaders Revenge, is an
interactive game that introduces you to the use of animations, scheduling of tasks,
keyboard events, and multi-touch control (Chapter 5, Invaders Revenge – an Interactive
Multi-touch Game). The third project, Kivy Player, teaches how we can control video
streams with a modern design and responsive interactions to maximize the use of the
screen (Chapter 6, Kivy Player – a TED Video Streamer).

[ iii ]
Preface

Occasionally, this book explains some technical but important Kivy concepts that are
related to the Kivy class structure and implementation, or the order and strategies to
draw on the screen. These explanations give the reader some insights into the Kivy
internals that will help them solve potential problems when they develop their own
projects. Even though they are not necessary for the comprehension of the main
topics of this book, they will become important lessons when the reader faces new
situations implementing their own applications.

This book grabs the reader's attention by stating interesting programming scenarios.
The sections are generally short and straightforward, making the learning process
constant. These short sections will also serve as a reference when the reader finishes
the book. However, serving as a reference doesn't prevent the text from achieving the
main goal, which is teaching bigger projects that connect the small topics. At the end
of this book, the reader will feel comfortable to start their own project.

What this book covers


Chapter 1, GUI Basics – Building an Interface, introduces the basic components and
layouts of Kivy and how to integrate them through the Kivy Language.

Chapter 2, Graphics – the Canvas, explains the use of the canvas and how to draw
vector figures on the screen.

Chapter 3, Widget Events – Binding Actions, teaches how to connect the interactions of
the user through the interface with particular code inside the program.

Chapter 4, Improving the User Experience, introduces a collection of useful components


to enrich the interaction of the user with the interface.

Chapter 5, Invaders Revenge – an Interactive Multi-touch Game, presents components


and strategies to build highly interactive applications.

Chapter 6, Kivy Player – a TED Video Streamer, builds a responsive and


professional-looking interface to control a video stream service.

[ iv ]
Preface

What you need for this book


You need to have some programming experience before starting this book and
specifically have a good understanding of some software engineering concepts,
particularly inheritance and the difference between classes and instances. You should
be already familiar with Python. That said, the code is kept as simple as possible and
it avoids the use of very specific Python nuances, so any other developer can follow
it. No previous experience of Kivy is required, though some general programming
knowledge of event handling, scheduling, and user interfaces would boost your
learning. You also need to have Kivy 1.9.0 installed with all its requirements. The
installation instructions can be found at http://kivy.org/docs/gettingstarted/
installation.html.

Who this book is for


The book aims at developers, specifically Python developers, who want to create
UI/UX applications for different platforms. This book will also benefit developers
that are seeking for an alternative to HTML5 or native Android/iOS development,
looking forward to learn about mobile development and its demands (multi-touch,
gestures, and animations), or wishing to improve their understanding of object-
oriented topics such as inheritance, classes and instances, and event handling.

Conventions
In this book, you will find a number of text styles 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:
"This is the reason we included the on_touch_down event."

[v]
Preface

A block of code is set as follows:


1. # File name: hello.py
2. import kivy
3. kivy.require('1.9.0')
4.
5. from kivy.app import App
6. from kivy.uix.button import Label
7.
8. class HelloApp(App):
9. def build(self):
10 return Label(text='Hello World!')
11.
12. if __name__=="__main__":
13. HelloApp().run()

The numeration restarts at the beginning of each chapter providing a unique


identifier to each line code. Code from previous chapter will never be referenced,
instead it will be copied again if needed. When we wish to draw your attention to a
particular part of a code block, the relevant lines or items are set in bold, for example,
line 10.

New terms and important words are shown in bold. Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "We need
an alternate way to stop the video (different from the Stop button)."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it helps
us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail feedback@packtpub.com, and mention


the book's title in the subject of your message.

[ vi ]
Preface

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 at 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.

Downloading the example code


You can download the example code files from your account at http://www.
packtpub.com for all the Packt Publishing books you have purchased. If you
purchased this book elsewhere, you can visit http://www.packtpub.com/support
and register to have the files e-mailed directly to you.

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.

To view the previously submitted errata, go to https://www.packtpub.com/books/


content/support and enter the name of the book in the search field. The required
information will appear under the Errata section.

Piracy
Piracy of copyrighted 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.

Please contact us at copyright@packtpub.com with a link to the suspected


pirated material.

[ vii ]
Preface

We appreciate your help in protecting our authors and our ability to bring
you valuable content.

Questions
If you have a problem with any aspect of this book, you can contact us at
questions@packtpub.com, and we will do our best to address the problem.

[ viii ]
GUI Basics – Building an
Interface
Kivy is a free, open source Python library that allows for quick and easy
development of highly interactive multiplatform applications. Kivy's execution
speed is comparable to the native mobile alternative, Java for Android or Objective
C for iOS. Moreover, Kivy has the huge advantage of being able to run on multiple
platforms, just as HTML5 does; in which case, Kivy performs better because it
doesn't rely on a heavy browser, and many of its components are implemented
in C using the Cython library in such a way that most of the graphics processing
runs directly in the GPU. Kivy strikes a great balance between performance and
portability across various hardware and software environments. Kivy emerges with
a simple but ambitious goal in mind:

"… same code for every platform, at least what we use every day: Linux/Windows/
Mac OS X/Android/iOS"

Mathieu Virbel (http://txzone.net/2011/01/kivy-next-pymt-on-android-


step-1-done/)

This support has being extended to Raspberry Pi, thanks to a crowd funding
campaign started by Mathieu Virbel, the creator of Kivy. Kivy was introduced
for the first time at EuroPython 2011 as a Python framework designed for creating
natural user interfaces. Since then, it has grown bigger and attracted an enthusiastic
community.

[1]
GUI Basics – Building an Interface

This book requires some knowledge of Python, and very basic terminal skills, but
also it requires some understanding of Object-Oriented Programming (OOP)
concepts. In particular, it is assumed that you understand the concept of inheritance
and the difference between instances and classes. Refer to the following table to
review some of these concepts:

Concept URL
OOP http://en.wikipedia.org/wiki/Object-oriented_
programming
Inheritance http://en.wikipedia.org/wiki/Inheritance_(object-
oriented_programming)
Instance http://en.wikipedia.org/wiki/Instance_(computer_
science)
Class http://en.wikipedia.org/wiki/Class_(computer_
science)

Before we start, you will need to install Kivy. The installation process for all different
platforms is documented and regularly updated on the Kivy website: http://kivy.
org/docs/installation/installation.html.

All code in this book has been tested with Kivy 1.9.0 and both
Python 2.7 and Python 3.4 (but 3.3 should work fine as well).
Note that packaging support for mobile is not yet complete
for Python 3.3+. For now, if we want to create mobile apps for
Android or iOS, we should use Python 2.7. If you want to know
your Python version, you can execute python -V in a terminal
to check your installed Python version.

In this chapter, we start by creating user interfaces using one of Kivy's most fun
and powerful components – the Kivy language (.kv). The Kivy Language separates
logic from presentation in order to keep an easy and intuitive code; it also links
components at an interface level. In future chapters, you will also learn how to build
and modify interfaces dynamically using pure Python code and Kivy as a library.

[2]
Chapter 1

Here is a list of all the skills that you are about to learn:

• Launching a Kivy application


• Using the Kivy language
• Instantiating and personalizing widgets (GUI components) through basic
properties and variables
• Differentiating between fixed, proportional, absolute, and relative
coordinates
• Creating responsive GUIs through layouts
• Modularizing code in different files

This chapter covers all the basics for building a Graphical User Interface (GUI)
in Kivy. First, we will learn techniques to run an application and how to use and
integrate widgets. After that, we will introduce the main project of the book, the
Comic Creator, and program the main structure of the GUI that we will continue
using in the following two chapters. At the end of this chapter, you will be able to
build a GUI starting from a pencil and paper sketch, and also learn some techniques
to make the GUI responsive to the size of the window.

Basic interface – Hello World!


Let's put our hands on our first code.

Downloading the example code


You can download the example code files for all Packt books you
have purchased from your account at http://www.packtpub.com.
If you purchased this book elsewhere, you can visit http://www.
packtpub.com/support and register to have the files e-mailed
directly to you.

[3]
GUI Basics – Building an Interface

The following is a Hello World program:


1. # File name: hello.py
2. import kivy
3. kivy.require('1.9.0')
4.
5. from kivy.app import App
6. from kivy.uix.button import Label
7.
8. class HelloApp(App):
9. def build(self):
10. return Label(text='Hello World!')
11.
12. if __name__=="__main__":
13. HelloApp().run()

This is merely Python code. Launching a Kivy program is not any


different from launching any other Python application.

In order to run the code, you open a terminal (line of commands or console)
and specify the following command in Windows or Linux: python hello.py
--size=150x100 (--size is a parameter to specify the screen size).

On a Mac, you must type in kivy instead of python after installing Kivy.app in /
Applications. Lines 2 and 3 verify that we have the appropriate version of Kivy
installed on our computer.

If you try to launch our application with an older Kivy version


(say 1.8.0) than the specified version, then line 3 will raise an
Exception error. This Exception is not raised if we have a
more recent version.

We omit the call to kivy.require in most of the examples in the book, but you will
find it in the code that you download online (https://www.packtpub.com/), and its
use is strongly encouraged in real-life projects. The program uses two classes from
the Kivy library (lines 5 and 6) – App and Label. The class App is the starting point of
any Kivy application. Consider App as the empty window where we will add other
Kivy components.

[4]
Chapter 1

We use the App class through inheritance; the App class becomes the base class of the
HelloApp subclass or child class (line 8). In practice, this means that the HelloApp
class has all the variables and methods of App, plus whatever we define in the body
(lines 9 and 10) of the HelloApp class. Most importantly, App is the starting point of
any Kivy application. We can see that line 13 creates an instance of HelloApp and
runs it.

Now the HelloApp class's body just overrides one of the existing App class's methods,
the build(self) method. This method has to return the window content. In our
case, a Label that holds the text Hello World! (line 10). A Label is a widget that
allows you to display some text on the screen.

A widget is a Kivy GUI component. Widgets are the minimal graphical


units that we put together in order to create user interfaces.

The following screenshot shows the resulting screen after executing the
hello.py code:

So, is Kivy just another library for Python? Well, yes. But as part of the library, Kivy
offers its own language in order to separate the logic from the presentation and to
link elements of the interface. Moreover, remember that this library will allow you to
port your applications to many platforms.

Let's start to explore the Kivy language. We will separate the previous Python code
into two files, one for the presentation (interface), and another for the logic. The first
file includes the Python lines:
14. # File name: hello2.py
15. from kivy.app import App
16. from kivy.uix.button import Label
17.
18. class Hello2App(App):

[5]
GUI Basics – Building an Interface

19. def build(self):


20. return Label()
21.
22. if __name__=="__main__":
23. Hello2App().run()

The hello2.py code is very similar to hello.py. The difference is that the method
build(self) doesn't have the Hello World! message. Instead, the message has been
moved to the text property in the Kivy language file (hello2.kv).

A property is an attribute that can be used to change the content,


appearance, or behavior of a widget.

The following is the code (rules) of hello2.kv, which shows how we modify the
Label content with the text property (line 27):

24. # File name: hello2.kv


25. #:kivy 1.9.0
26. <Label>:
27. text: 'Hello World!'

You might wonder how Python or Kivy knows that these two files (hello2.py and
hello2.kv) are related. This tends to be confusing at the beginning. The key is in the
name of the subclass of App, which in this case is HelloApp.

The beginning part of the App class's subclass name must coincide
with the name of the Kivy file. For example, if the definition of the
class is class FooApp(App), then the name of the file has to be
foo.kv and in the same directory of the main file (the one that
executes the run() method of App).

Once that consideration is included, this example can be run in the same way we
ran the previous one. We just need to be sure we are calling the main file – python
hello2.py -–size=150x100.

This is our first contact with the Kivy language, so we should have an in-depth
look at it. Line 25 (hello2.kv) tells Python the minimal version of Kivy that should
be used. It does the same thing as the previous lines 2 and 3 do in hello.py. The
instructions that start with #: in the header of a Kivy language are called directives.
We will also be omitting the version directive throughout the rest of this book, but
remember to include it in your own projects.

[6]
Chapter 1

The <Label>: rule (line 26) indicates that we are going to modify the Label class.

The Kivy language is expressed as a sequence of rules. A rule is a piece


of code that defines the content, behavior, and appearance of a Kivy
widget class. A rule always starts with a widget class name in angle
brackets followed by a colon, like this, <Widget Class>:

Inside the rule, we set the text property with 'Hello World!' (line 27). The code
in this section will generate the same output screen as before. In general, everything
in Kivy can be done using pure Python and importing the necessary classes from
the Kivy library, as we did in the first example (hello.py). However, there are
many advantages of using the Kivy language and therefore this book explains all
the presentation programming in the Kivy language, unless we need to add
dynamic components, in which case using Kivy as a traditional Python library is
more appropriate.

If you are an experienced programmer, you might have worried that modifying
the Label class affects all the instances we could potentially create from Label,
and therefore they will all contain the same Hello World text. That is true, and
we are going to study a better approach to doing this in the following section.

Basic widgets – labels and buttons


In the last section, we used the Label class, which is one of the multiple widgets that
Kivy provides. You can think of widgets as interface blocks that we use to set up a
GUI. Kivy has a complete set of widgets – buttons, labels, checkboxes, dropdowns,
and many more. You can find them all in the API of Kivy under the package kivy.
uix (http://kivy.org/docs/api-kivy.html).

We are going to learn the basics of how to create our own personalized widget
without affecting the default configuration of Kivy widgets. In order to do that,
we will use inheritance to create the MyWidget class in the widgets.py file:
28.# File name: widgets.py
29. from kivy.app import App
30. from kivy.uix.widget import Widget
31.
32. class MyWidget(Widget):
33. pass
34.
35. class WidgetsApp(App):

[7]
GUI Basics – Building an Interface

36. def build(self):


37. return MyWidget()
38.
39. if __name__=="__main__":
40. WidgetsApp().run()

In line 32, we inherit from the base class Widget and create the subclass MyWidget.
It is a general practice to create your own Widget for your applications instead of
using the Kivy classes directly, because we want to avoid applying our changes to
all future instances of the widget Kivy class. In the case of our previous example
(hello2.kv), modifying the Label class (line 26) would affect all of its future
instances. In line 37, we instantiated MyWidget instead of Label directly (as we did
in hello2.py), so we can now distinguish between our widget (MyWidget) and the
Kivy widget (Widget). The rest of the code is analogous to what we covered before.

The following is the corresponding Kivy language code (widgets.kv):


41. # File name: widgets.kv
42. <MyWidget>:
43. Button:
44. text: 'Hello'
45. font_size: 32
46. color: .8,.9,0,1
47. pos: 0, 100
48. size: 100, 50
49. Button:
50. text: 'World!'
51. font_size: 32
52. color: .8,.9,0,1
53. pos: 100,0
54. size: 100, 50

Note that now we are using buttons instead of labels. Most of the basic widgets
in Kivy work in similar ways. In fact, Button is just a subclass of Label that
incorporates more properties such as background color.

Compare the notation of line 26 (<Label>:) in hello2.kv with line 43 (Button:) of


the preceding code (widgets.kv). We used the rule class notation (<Class>:) for the
Label (and MyWidget) class, but a different notation (Instance:) for Button. In this
way, we defined that MyWidget has two instances of Button (line 43 and 49).

[8]
Chapter 1

Finally, we set the properties of the Button instances. The font_size property sets
the size of the text. The color property sets the text color and is specified in RGBA
format (red, green, blue, and alpha/transparency). The properties size and pos set
the size and position of the widget and consist of a pair of fixed coordinates (x for
horizontal and y for vertical), the exact pixels on the window.

Note that the coordinate (0, 0) is located at the bottom-left corner,


the Cartesian origin. Many other languages (including CSS) use
the top-left corner as the (0, 0) coordinate, so take note!

The following screenshot shows the output of widgets.py and widgets.kv with
some helpful annotations:

A couple of things can be improved in the previous code (widgets.kv). First, there
are some repeated properties for both buttons: pos, color, and font_size. Instead
of that, let's create our own Button as we did with MyWidget so it will be easy to
keep the buttons' design consistent. Second, the fixed position is quite annoying
because the widgets don't adjust when the screen is resized. Let's make it responsive
to the screen size in the widgets2.kv file:
55. # File name: widgets2.kv
56. <MyButton@Button>:
57. color: .8,.9,0,1
58. font_size: 32
59. size: 100, 50
60.
61. <MyWidget>:
62. MyButton:
63. text: 'Hello'
64. pos: root.x, root.top - self.height
65. MyButton:
66. text: 'World!'
67. pos: root.right - self.width, root.y

[9]
GUI Basics – Building an Interface

In this code (widgets2.kv), we create (<MyButton@Button>:) and customize the


MyButton class (lines 56 to 59) and instances (line 62 to 67). Note the differences in
the manner we defined MyWidget and MyButton.

Because we did not define the MyButton base class in widgets.


py as we did with MyWidget (line 32 of widgets.py), we have to
specify @Class in the Kivy language rule (line 56). In the MyWidget
class case, we also needed to define its class from the Python side
because we instantiated it directly (line 37 of widgets.py).

In this example, each Button class's position is responsive in the sense that they are
always in the corners of the screen, no matter what the window size is. In order to
achieve that, we need to use two internal variables – self and root. You might be
familiar with the variable self. As you have probably guessed, it is just a reference
to the Widget itself. For example, self.height (line 64) has a value of 50 because
that is the height of that particular MyButton class. The variable root is a reference
to the Widget class at the top of the hierarchy. For example, the root.x (line 64) has
a value of 0 because that is the position in X-axis of the MyWidget instance created on
line 37 of widgets.py.

MyWidget uses all of the window's space by default; therefore, the origin is (0, 0).
The x and y and width and height are also widget properties, which we can
use to disjoint pos and size respectively.

Fixed coordinates are still a laborious way to organize widgets and elements in the
window. Let's move on to something smarter – layouts.

Layouts
No doubt, fixed coordinates are the most flexible way to organize elements in an
n-dimensional space; however, it is very time consuming. Instead, Kivy provides
a set of layouts that will facilitate the work of organizing widgets. A Layout is a
Widget subclass that implements different strategies to organize embedded widgets.
For example, one strategy could be organizing widgets in a grid (GridLayout).

Let's start with a simple FloatLayout example. It works in a very similar manner
to the way we organize widgets directly inside of another Widget subclass, except
that now we can use proportional coordinates ("percentages" of the total size of the
window) rather than fixed coordinates (exact pixels).

[ 10 ]
Chapter 1

That means that we won't need the calculations we did in the previous section with
self and root. Here is the Python code of an example that resembles the previous
one:
68. # File name: floatlayout.py
69.
70. from kivy.app import App
71. from kivy.uix.floatlayout import FloatLayout
72.
73. class FloatLayoutApp(App):
74. def build(self):
75. return FloatLayout()
76.
77. if __name__=="__main__":
78. FloatLayoutApp().run()

There is nothing really new in the preceding code (floatlayout.py), except the
use of FloatLayout (line 75). The interesting parts are in the corresponding Kivy
language (floatlayout.kv):
79. # File name: floatlayout.py
80. <Button>:
81. color: .8,.9,0,1
82. font_size: 32
83. size_hint: .4, .3
84.
85. <FloatLayout>:
86. Button:
87. text: 'Hello'
88. pos_hint: {'x': 0, 'top': 1}
89. Button:
90. text: 'World!'
91. pos_hint: {'right': 1, 'y': 0}

In floatlayout.kv, we use two new properties – size_hint (line 83) and pos_
hint (lines 88 and 91) .They are similar to size and pos but receive proportional
coordinates with values ranging from 0 to 1; (0, 0) is the bottom-left corner and (1,
1) is the top-right corner. For example, the size_hint property on line 83 sets the
width to 40 percent of the window width and the height to 30 percent of the current
window height. Something similar happens to the pos_hint property (lines 88 and
91 but the notation is different – a Python dictionary where the keys (for example,
'x' or 'top') indicate which part of the widget is referenced. For example, 'x'
is the left border.

[ 11 ]
GUI Basics – Building an Interface

Note that we use the top key instead of the y one on line 88 and the right key
instead of the x one on line 91. The top and right keys respectively reference
the top and right edges of Button. In this case, we could have also used x and y for
both axes; for example, we could have written pos_hint: {'x': .85, 'y': 0} as
line 91. However, the right and top keys avoid us some calculations, making the
code clearer.

The next screenshot shows the result, and the available keys for the pos_hint
dictionary:

The available pos_hint keys (x, center_x, right, y, center_y, and top)
are useful to align the edges or for centering. For example, pos_hint:
{'center_x':.5, 'center_y':.5} would align a widget in the middle
no matter the size of the window.

We could have used the top and right properties with the fixed positioning of
widgets2.kv (line 64 and 67), but note that pos doesn't accept Python dictionaries
({'x':0,'y':0}), just pairs of values exclusively corresponding to (x, y). Therefore,
instead of using the pos property, we should use the x, center_x, right, y,
center_y, and top properties directly (not dictionary keys). For example, instead of
pos: root.x, root.top - self.height (line 64), we should have used:

x: 0
top: root.height

The properties x, center_x, right, y, center_y, and top


always specify fixed coordinates (pixels), and not proportional
ones. If we want to use proportional coordinates, we have to be
inside a Layout (or an App) and use the pos_hint property.

[ 12 ]
Exploring the Variety of Random
Documents with Different Content
"What?"
"Rachel's marriage; what else did you suppose?"
"I don't see why it should have been sudden. I seem to remember
that Mrs. Astry's was—"
"A sort of nine days' wonder? Yes, but Rachel's was more amazing in
a different way."
He considered several dominoes of sugar and selected a small half.
"In what way?" he risked, aware that his cousin was more than a
match for him in the conversational arena.
"Her engagement was announced on Monday and she was married
on Thursday."
"That doesn't show that the engagement had only existed since
Monday."
"But it does show just that. Up to Monday Belhaven had been
making violent love to Eva Astry; everybody knew it."
Charter's face flushed darkly. "I hope you don't repeat any such
malicious gossip as that, Pamela!"
"It isn't gossip; ask Paul. We were out there for a week-end; so was
Massena, the Italian Chargé d'Affaires, and he was perfectly amazed.
Belhaven was simply devoted to Eva, and then to our surprise Astry
announced his engagement to Rachel."
"All this only goes to show that he needed a thrashing."
"Belhaven isn't the sort to get it. You know he's rather charming, but
I'm quite sure that Rachel never cared for him."
"I can see no other reason for her accepting him."
"Nor I, yet I've heard things—" Pamela stopped; after all Charter
was the last one to hear all this gossip; he would loathe it.
But he pressed the point. "What things?"
"Well, for one thing, they say Astry made the match to get him out
of Eva's way."
"I should say it was putting him in it; it would have been easier to
horsewhip him and be done with it."
Pamela sighed. "Your methods are so cryptic. I don't understand the
thing anyway, but—" she weighed her words—"I know Rachel's
wretched."
He rose and walked up and down the room; she was giving form
and shape to the impression that had been growing in his own
slower mind as he recalled Rachel's evident distress.
Pamela made matters worse, for looking up at his tall figure as it
approached her and seeing the trouble in his face, she gave way to
her feelings.
"Oh, John, I wish you'd been here!"
He halted, amazed. "Why?"
"Because—because I always thought Rachel liked you, and you
might have prevented it somehow! I felt that she was—well, just
sacrificed for Eva."
"I can't imagine why she should have been," he said hoarsely. "Good
God, Pamela, don't make it any worse!"
Pamela, who had been using a plummet-line to sound the depths,
was filled with awe at her discovery.
"I don't believe she ever cared a rap for Belhaven!" she climaxed.
"I don't see that that makes it any better."
"It doesn't make it any worse, and—"
"Perhaps not." Charter's face was very white. "Pamela, suppose we
talk of something else!"
X
THE slow weeks that had dragged by had not been happy ones for
Eva Astry. Her first feeling of relief that it was done, the ordeal of
Rachel's marriage and the risk that Astry would discover the motive
that had prompted it, was over, and she had long ago begun to feel
that she had purchased her immunity at too heavy a price. The cost
of it, indeed, was chiefly revealed to her by Belhaven's attitude. The
cruelty of his position began to appear to her in various aspects and
she saw that her betrayal of him had cost her the chief place in his
regard. She began to be vaguely aware that she had given him the
right to hate her, that the sort of love she had inspired was not of a
fiber to resist such an attack, that it was not even equal to the
demands of common self-sacrifice. Unconsciously, too, she began to
compare his attitude at the time of Astry's discovery with that of
Rachel. Her sister had sacrificed herself to save her from the shadow
of dishonor, while her lover had not even had the manhood to face
her husband. No light in which she could view it made the situation
seem less ugly, and at no time did Belhaven figure as a hero. Yet her
affection for him had been strong enough to torture her with
jealousy when she saw him stand up to be married to her sister.
Although she knew that Rachel probably despised him, her own
nature—soft and pleasure-loving—was not one to readily yield an
admirer to another woman. It had been that reluctance to part with
one that had made her recall Belhaven after her marriage with Astry.
She could have married him in the first place but she had greatly
preferred the Astry millions. It had seemed to her that all the
accessories and comforts of wealth were necessary to her, that her
beauty, always of a rare and lovely type, demanded the setting that
Astry offered her.
She had always affected a mode of living and a class of society
which had drained every purse in the family to keep her afloat, even
as a young girl, and she had always intended to achieve a dazzling
marriage. Astry, while failing to offer her a title and a place in
Europe which she had coveted, did present the next thing to it,—the
possession of a great fortune and the power to purchase the place in
society which she had failed to attain through her mere beauty and
charm. If she could not be a princess in a small European State, like
one of her cousins, she could be the wife of an American millionaire,
and she did not hesitate long over her decision. Belhaven, whose
fortune was much smaller and who had squandered a large part of
his income, was no match for Astry, and Eva's marriage to the latter
had been celebrated with all the pomp that the Leven family,
reinforced by the maternal relatives, the Sterrits, had been able to
achieve. The paying for it, indeed, had driven poor Aunt Drusilla
Leven into the retirement of an obscure Italian town where, as she
frankly wrote her friends, washing was fabulously cheap. Profiting by
this financial sacrifice, Eva had made the great match of the season
and had never bestowed a thought upon poor Aunt Drusilla in her
exile, except to be thankful that she did not have to invite that "old
frump" to her dinners. But, after the first few months, even the
society of a frump would have been more desirable than the
continued criticism of a watchful, jealous, and uncongenial husband.
After his first discovery that Eva was not, as he had supposed, a
beautiful and delicate replica of Rachel, Astry had been frankly
disappointed. They had very little in common and he could not
remain long unaware that, if Eva did not love money for its own
sake, she cared greatly for the luxuries and privileges that money
could obtain for her. Finding himself, therefore, an object of
indifference to his young and beautiful wife, he met her with a like
coldness and reserve, so that Eva was soon, like a naughty child,
shut out of the inner circle of her husband's confidence. It was at
this point, when they were both to blame, that she began to
encourage Belhaven's renewed devotion. The result had been that
Astry, no longer trusting her, had taken alarm, and there had been
many quarrels, at first petty and then so serious that they led up to
the moment when she had feared for Belhaven's life. Then had
come the climax and her falsehood about her sister, Rachel's
sacrifice to protect her, and the marriage.
Now that it was over and she was left to view the matter from every
standpoint, in the cold light of common sense, she was filled with
horror at the tangle she had made; and the continued necessity of
acting it all out, of keeping up the tissue of falsehood that she had
woven, was wearing her out. Her beauty, of that delicate and
ephemeral type that is dependent on color and light, was visibly
diminished. Mrs. Van Citters, happening in upon her at the
unfortunate hour of noon, when all the defects are most fiercely
revealed, thought that she looked absolutely pinched and white, and
that only her peculiarly lovely hair and eyes saved her from being
what Aunt Drusilla Leven would have called "real peaked."
Pamela, who had been carefully instructed by her husband to attend
strictly to her own business, found it difficult to refrain from
remarking upon Eva's looks, but she began the conversation with the
determination to be very guarded and to only skim the surface.
"Are you really going to stay all summer?" she inquired casually, as
she folded her parasol and tossed it with her gloves on a convenient
chair in the breakfast-room, where Eva had just been taking coffee
and toast. "Paul and I get off to-morrow. Mother took the baby last
week; it's abominable in the city now."
"Well, you see we're not in the city," Eva drawled, "and Johnstone's
been interested in the tariff. Besides, I suppose we'll go to Florida
this winter and—" she shrugged her shoulders—"what's the use?"
Pamela stretched out an absent-minded hand and, picking up a
strawberry from the cut-glass dish on the table, dangled it by its
green stem. "I suppose you like to be here on Rachel's account; she
isn't going away, is she?"
"I'm sure I don't know; I suggested the pyramids of Egypt."
Pamela clung to the surface. "There are such horrible cockroaches
on those Nile boats," she observed.
"I can't imagine why people here have made such a fuss about
Rachel's marriage," said Eva fretfully. "One would think a bomb had
exploded; they seem to catalogue it with murder and sudden death."
Pamela looked vacant. "Do they? You know I've been simply taken
up with trying to keep John Charter with us; Paul and I offered all
sorts of inducements but he wouldn't stay."
"Good gracious, hadn't you Mrs. Prynne? I thought they were
engaged."
"Nonsense! Imagine John marrying a paper doll! I don't know who
started that report unless it was Mrs. Billop."
"She's equal to anything, but I can't see her object unless she
thought Mrs. Prynne had designs on Sidney."
"Poor Lottie! I think even she'd draw the line there! I was perfectly
amazed when Paul told me about that supposed engagement, the
day that Rachel's was announced, but I fancy that was really what
put it into Mrs. Billop's head."
"I don't see why."
"Why of course you know John was in love with Rachel?"
Eva, who had been only languidly attentive, turned quickly. "What?"
Pamela reddened. "Didn't you know it? Didn't Rachel ever tell you
about it?"
"Not a word."
Her visitor felt deliciously guilty; she had not intended to transgress
her husband's injunctions, but, as long as she had inadvertently let
the cat out of the bag, there was a wicked satisfaction in seeing
Eva's amazed incredulity.
"Well, of course I knew it," she said sweetly, nibbling her strawberry,
"it was perfectly easy to see; John's so thoroughly masculine that he
can't hide it; you know men are just like ostriches; they bury their
heads in the sand and think they're completely hidden."
"If it was so obvious, it seems rather strange, doesn't it, that I never
heard anything about it?"
"Well, I suppose of course Rachel didn't reciprocate and so you
didn't notice."
Eva deliberated; she began to suspect that Pamela was watching
her. "No, Rachel didn't reciprocate," she risked at last; "that's
certain, isn't it?"
"Yes, if we take it for granted that we always marry the people we
care for."
Eva blushed,—a blush that spread painfully from brow to chin and
throat,—her eyelids quivered and drooped from Pamela's gaze, she
clasped her hands tightly under the table.
"Don't you think Rachel's too superbly honest to do anything else?"
she asked.
"I think Rachel's perfectly lovely and the dearest girl in the world,
but she looks—oh, Eva, can't you see how wretched she looks?"
"No, I haven't seen it, and she can't be; I won't let her be!" Eva's
face quivered.
"There, now I've made you unhappy!" lamented Pamela, sincerely
distressed and contrite. "I shouldn't have said it, but Rachel does
look so pale, so worn, and you know I do love her."
"You can't love her as I do; she's the dearest thing in the world! She
isn't unhappy: I won't believe it; and this is all nonsense about
Charter. You dreamed it, Pamela!"
"Oh, I only said that he was in love with her!"
"You implied the rest of it!"
"I'm such a romantic idiot; Paul says so."
"I hope people aren't talking about it."
"Oh, no, no!"
Eva sank back in her chair and pressed her hands over her eyes for
an instant. "Why in the world did you want to frighten me so,
Pamela?"
"But I didn't. I only went on talking about Rachel when I should
have held my tongue; I didn't mean to worry you, but she does look
wretchedly unwell and—"
"Who does?" said Astry, who had entered as she spoke.
Pamela, in some discomfiture, cast an appealing glance at Eva, but
Eva offered no explanations and she was compelled to rise to the
emergency alone.
"We were talking of Rachel; I think she's feeling the heat," she said
feebly, as Astry shook hands with her.
"Nonsense, it's been quite cool out here and Rachel's never
complained of the weather. Belhaven just told me that she'd refused
to go to Newport."
Pamela looked about for her parasol and gloves; she knew that John
Charter had gone to Newport to visit an aunt.
"I think it's perfectly abominable myself,—I mean the weather," she
said desperately; "we're going to-morrow."
Astry moved easily over to the mantelpiece and began to arrange
one of his Chinese gods. "There'll be an exodus now," he remarked,
"since Congress adjourned yesterday. Massachusetts Avenue is
boarded up already; only the unfashionable will dare to stay in the
face of those shutters. I expect Eva to go to Lenox."
"I'm not going anywhere," she replied quickly; "this is my summer
off. Don't go, Pamela; stay and we'll go over to see Rachel."
But Pamela felt guilty; if she had only skimmed the surface, she had
certainly skimmed it very thoroughly. "I can't stay; think of the
things I've got to do before half-past seven to-morrow morning."
"Nothing half as important as staying to see your friends," said Astry.
But Pamela would not be diverted from her flight, though she stood
on the terrace a moment while she raised her pink parasol and
whirled it slowly around before balancing it over her head.
"If I had a view like this I'd stay too!" she declared.
Eva, standing in the door, looked out over the magnificent prospect
with languid eyes.
"Oh, you'd get tired of it! I sometimes want to paint the dome sky-
blue—as the monkey did his tail."
Disregarding Eva's irreverence, Pamela waved again from the lower
terrace, and then they watched her go down the long road until the
fluttering pink parasol diminished to the size of a new blown peony.
Astry, who had escorted her to the gate, came back slowly and his
wife noticed for the first time that his expression was unusually
grave. In the broad sunshine she saw the crow's-feet about his eyes
and the streak of gray in his hair; he was not handsome, but
distinguished, and he had that indefinable air that is inalienable from
a man of his birth and breeding. As he approached, he took a letter
out of his pocket and Eva's fascinated eyes, following his
movements, discovered that the envelope was small and odiously
blue. Her hand tightened its hold on the white pilaster beside the
door and she stood quite still, though a thrill of panic shot through
her with an almost irresistible impulse of flight. He came up and
proffered the letter gravely.
"I think this is yours."
She took it mechanically, coloring again almost as painfully as she
had under Pamela's observation.
"Craggs brought it up with my mail this morning, I hope by mistake,
but there have been others like it and it seemed worth while to tell
you."
"I don't see why you keep that man!"
"My dear Eva, the excellent Craggs is invaluable; he knows how to
press my trousers and hold his tongue."
"He creeps about the house like a spy."
Astry turned quickly. "I hope you don't think I employ servants to
watch my wife."
She bit her lip, sudden tears in her eyes.
Her husband's face changed sharply. "At least I deserve fair
treatment; I'm incapable of sinking to such a depth as that."
"You know I dislike the man."
"That's neither here nor there; the question's more vital. Did you
suppose because of what I said to you that night, the night of
Rachel's engagement," his voice halted an instant and then went on,
"that I had set Craggs to watch you?"
Eva leaned heavily against the door with the little blue note crushed
in her hand. "There was nothing else for me to think," she said in a
low voice.
"Good heavens!" exclaimed Astry, "is that what you think of your
husband?"
He turned away and was half-way across the terrace when a new
thought arrested him and he came back.
"I spoke of that note just now to warn you. As I said, several have
been put with my mail, though plainly addressed to you. I have
reason to think that the servants do it purposely. I can assure you
that I have no wish to see them."
Eva tried to answer him, to assure him that the letter was of no
importance, but she could not; her tongue refused to utter the
denial and she remained standing for a while as he had left her, her
head resting against the white pilaster and her eyes closed. He had
been dignified and almost kind and she felt humbled to the dust
before his just anger. She began to be vaguely aware that she had
judged him by a standard too mean for a man of his intellect and
strength of character; she felt that she had given him the right to
despise her and her humiliation strangled her natural impulse to
defend herself at his expense. Besides, there was that letter in her
pocket. How many of them had he seen? She shuddered at the
thought of the blue conspicuousness of that cheap envelope with its
over-powering perfume. No one could mistake one of them, and the
servants had been watching them, the servants who probably knew
the hand-writing. That thought thrust out the other which had
clothed Astry in a new aspect.
She made her way into the house and slowly ascended the stairs to
her own room. Her heart was heavy as she closed the door and
locked it. Then she drew the letter out of her pocket, read it, and
tore it up with keen disgust. It was from her former maid, Zélie, and
it demanded five hundred dollars. There had been three of these in
a month, and to each of them Eva had responded with a cheque.
But money only increased the demand for money; it was like casting
a piece of paper into a sucking draught of a furnace,—it was
consumed in a twinkling.
Ever since Rachel dismissed the French girl, Eva had been in terror
of her tongue, and then blackmail actually began. At first it was easy
to pay a little, and then a little more; the sense of security was too
sweet to be dear at any price. But security could not be purchased;
a hundred was a mere drop in the bucket, and Zélie could dictate
her terms. She was with Mrs. Billop; Mrs. Billop desired to know
everything, but Zélie had been faithful to Eva, how faithful Eva could
judge, but she was perishing for money, she was the sole support of
aged parents, she must be paid or—she left the rest to Eva's
imagination, and Eva knew Mrs. Billop. She longed extremely to be
rid of Mrs. Billop and Zélie, but money was no longer plentiful; she
had nearly exhausted her own cheque-book and an appeal to Astry
was impossible, since their relations were strained to the breaking-
point. She had borrowed heavily of Rachel, but now even Rachel
asked questions. Of course there was Belhaven, but here some
instinct innate in her blood stayed Eva; she was not sordid and she
hated to ask Belhaven to pay the price of Zélie's silence. Moreover
she felt that Belhaven was slipping away from her; he had honestly
kept faith with Rachel, he had tried to let the past go, and, lately,
she had even felt in his manner, his detached air, his vagrant
glances, that he had ceased altogether to feel her spell, that he was
eluding her. He no longer looked only at her, he no longer felt her
presence in the room; he had grown distant and deeply thoughtful.
Clearly she could not appeal to Belhaven.
Alone in her room Eva went over her accounts, studying them with
an anxiety new to her. She wrote an eager note to one of her
father's trustees suggesting a new investment that would bring
greater results; then she remembered Aunt Drusilla Leven, still in
her self-imposed exile. An appeal to her would, perhaps, avert the
danger if Aunt Drusilla had managed to recuperate financially in the
interval. Meanwhile Eva could only spare two hundred for the
cormorant which is called blackmail. Only two hundred—that made
five thousand in five months. The sum was appalling. Eva rebelled
against it, and she rose and paced the room angrily, her cheeks red.
She needed a great deal of money herself; she was wildly
extravagant, and she would have to curtail her own luxuries for this.
It was odious! A servant, a little French girl, a worthless creature,
who was to be feared chiefly because she would not hesitate to
falsify the matter from the beginning to the end and make a
mountain out of a mole-hill! She would not endure it, and she tore
up the cheque and wrote one for fifty and a note to say it was the
last, she had paid enough.
She received no reply to this letter; no word was said, no sign made.
After all, she reflected, she had won the victory; she had only
needed a little courage. What a fool she had been!
Yes, what a fool, but the piper must always be paid.
XI
THAT night was a sleepless one for Eva. Not only did the thought of
that little blue note recur to her constantly, but also the
remembrance of Pamela's talk about Charter. Could it possibly be
true? She recalled Rachel's face that night with a new perception of
its anguish. At the time she had been too much absorbed in her own
misery to see her sister's distress, but now her quickened mind
leaped to conclusions. Was it possible that the announcement of
Mrs. Prynne's engagement had influenced Rachel, that she had
taken the leap in the dark because she was hurt to the quick? If so,
the return of Charter a free man and still in love with her must have
been the crowning agony of it all.
Eva sat up in bed in the soft darkness of the summer night and
conjured up the past weeks, and at every point she found evidence,
at every turn she saw the mark of Rachel's footprints ahead of her. It
has been said that it is natural to hate one whom we have deeply
injured, and at first Eva had recoiled from Rachel, but now a sudden
rush of feeling carried her back to the days when they had been
children together and Rachel had always given up to her, always
petted her. Rachel's love had been like a well that was too deep for
Eva's shallow plummet to fathom. Reviewing all the events that had
crowded on the heels of Astry's accusation, Eva found no crumb of
comfort for herself. She had suffered loss and mortification and a
keen and excruciating anxiety; she had saved herself, as it were, at
the slippery edge of the chasm, but she had been forced to crawl
and cling to that edge ever since. She had sacrificed her sister, but,
although she had saved herself for the moment, she had not
achieved security, for there was Zélie. The little French girl who had
discovered how near Mrs. Astry had been to running away with
Belhaven held a rod of iron over her head that not even Rachel could
avert. If it fell, it would not only ruin Eva but it would involve her
innocent sister in the disgrace. It was characteristic of Eva that she
nearly got out of bed to write another and larger cheque for Zélie,
but she had not the courage; instead she shrank back into the
pillows, afraid of the darkness and the solitude, afraid that if she
moved Astry might hear her.
Through her terror and anxiety, too, filtered the thought, vague at
first but crystallized at last into coherent shape, that she had gained
nothing at all, not even the love of Belhaven, for, when she forced
him to the alternative of his cowardly marriage to save her
reputation, she had lost his affection, if she had ever had it! That
was a question that tore her heart, for Eva, loving admiration and
worship at her shrine, was disgusted with the idea that perhaps after
all she had got herself into this horrible tangle for a man who had
never really loved her and who, therefore, gave her up the more
easily. She had lost everything then, she argued, and not even
gained her own soul. Eva was just beginning to recognize that the
Way of the Transgressors is hard.
In the morning she was troubled again at the new aspect in which
her husband appeared. He was grave and almost kind; if he watched
her, she was not aware of it, and he made no reference to those
awful blue notes. She looked at him covertly, while trying to swallow
her coffee, and discovered new lines about his eyes and mouth, a
certain settled gravity of demeanor that seemed to remove him
further and further from her, to alienate even his admiration and the
keener tribute of his jealousy; she began to be vaguely aware that
she was no longer first even with him. She had never loved him, and
while she thought he loved her it was pleasant to flout him, but his
indifference was altogether another matter. If blessings brighten as
they take their flight, Astry's love certainly increased in value as it
diminished. She was conscious, too, that he talked less than had
been his custom when they were first married; he had dropped into
the habit of absorbing his newspaper with his coffee and she found
herself in the common wifely predicament of either remaining
quiescent or trying to read the news upside down across the
breakfast-table. Eva, who had been spoiled all her life, chafed under
this commonplace treatment; it was disgusting to find herself
suddenly of no importance. She did not yet recognize the inalienable
truth of the maxim that indifference is the death of love, that no
human being can go on forever loving another without the shadow
of a return, and that there are few so humble that they care to pick
up the crumbs that fall under the table. She had treated Astry with a
pretty and languid indifference; she had violated his sense of the
proprieties by encouraging the love-making of other men, and she
had finally, it seemed, murdered his love for her.
The situation was quite unbearable and, pushing aside her plate, she
rose from the table and began to tie on a large sun-hat of lace and
muslin that framed her delicate face in its soft and filmy folds.
Astry glanced up from his paper. "You'll find it warm; it's eighty-five
in the shade."
She shot an indignant glance at the paper behind which he had
immediately subsided. "I don't think I'll feel it!"
Astry made no reply and Eva passed out of the long French window
on to the piazza, but, instead of descending into the rose garden,
which was situated on that side of the house, she made her way
slowly across the terrace and through the tennis-court to the road.
There she stood a moment considering, her white dress gathered up
in both hands.
The road was shady and inviting, but it led directly past Rachel's
front door and, although she was going there, she did not want to
meet Belhaven. She had tried lately to avoid an encounter, and while
she stood there, undecided, she was almost startled by the
appearance of the postman, who stopped to hand her a letter. She
took it gingerly, but a glance reassured her; it was not Zélie again,
but only Pamela. Standing under the shade of a friendly locust, Eva
broke the seal and glanced hastily at the careless, fashionable
scrawl.
"Dear Eva:—You looked so distressed when I went away
that I can't forget it. Don't think of what I said; I don't
know anything, and I'm sure Rachel never loved Charter, if
she did why marry Belhaven? Don't you see how simple it
is? Do take more care of yourself. We're off at seven
thirty-five to-morrow, a brutal hour, but I hope it will be
cooler. In haste, yours,
"Pamela."
In spite of herself Eva smiled. Her friend's method of solving the
problem was so entirely the usual method of people who try to solve
the problems of others. Pamela, in an effort to comfort, was only
turning the weapon in the wound, as the ignorant sympathizer will
tear the heart open by uttering condolences that only strip the
horror of all decent covering and accumulate the agony. Pamela's
argument only furnished another reason for Eva to feel keenly
distressed; she began to be convinced that Rachel had really loved
Charter, while she had thrust Belhaven upon her at the very moment
when she thought that her lover had forgotten her to marry Mrs.
Prynne. Eva tore up Pamela's note and, scattering the bits
broadcast, walked on under the trees; but she could not escape the
thought that possessed her, it had become an idée fixe. It explained
so many things, it goaded her with a hundred little pricks of pain.
She scarcely noticed her path under the familiar trees, and she
found none of Rachel's pleasure in a flower by the wayside or a bird
in the bush. The simple, homely things of nature, the things of the
Creator which comforted one sister, passed unseen by the other. Eva
only observed that there was no one in the cedar grove and she
entered by the little turnstile that led her to the rear of the house.
She felt almost like some trespasser skulking along behind the
rhododendrons, but she could not make up her mind to face the
ordeal of Rachel and Belhaven together. She stopped once or twice,
her graceful figure concealed by the clustering foliage, and peeped
through some vista in the greenwood. The old, rambling house
nestled under the trees with a peculiarly friendly and inviting aspect,
and Eva perceived, with a fresh pang, how entirely Rachel had
transformed it and clothed it with beauty and quaintness.
The deep-seated chairs on the wide veranda, the cool awnings, the
lovely coloring of the flower-beds, all suggested the fostering hand
of a woman clothed with those peculiar gifts which make home
beautiful. Eva perceived it with a new keenness of vision and her
heart sank as she recalled the unreal splendor of the big house that
she had never loved to dwell in, which had been altogether for show
and entertainment, and where she dreaded now to be alone with
Astry. With this thought came another: with a sharp stab of pain,
she wondered if Belhaven saw the difference, if he felt it too?
She had scarcely asked herself this question, however, when he
appeared and she drew back with an involuntary start, forgetting
that the rhododendrons completely screened her from his careless
glance. But, after the first panic, she peeped out again and saw him
lighting his cigar with the comfortable air of the habitué. He was clad
in a suit of light summer flannels and wore a straw hat, and it
seemed to Eva that he looked younger and taller than usual. He
stood a moment on the steps and then sauntered down the
driveway and disappeared through the gate. As he went he turned,
looked back, and raised his hat with a courteous gesture. Eva caught
her breath; then Rachel was watching him go!
After all, perhaps her distress was groundless, perhaps these two
had found a way to reconcile themselves to their fate. She stood
still, her lips compressed, thinking; with her old, soft self-pity, she
thought her own position the hardest in the world, and that she had
created the situation herself did not alleviate its misery. It was,
perhaps, this very selfishness, this desire to find that no grief was as
great as her own, that drove her on, for she only remained a
moment in doubt; the next she was crossing the short stretch of
lawn between the rhododendrons and the rear door. Sure now that
Belhaven was out, she trailed leisurely across the intervening space
and made her way to the front of the house.
As she had anticipated, she found Rachel in the front hall, but not
even jealousy could detect any embarrassment or tenderness in her
expression; instead, young Mrs. Belhaven looked deeply depressed.
The sisters greeted each other with that constraint which was the
natural result of their mutual knowledge. Rachel had been engaged
in arranging some long-stemmed roses in a tall vase and she went
on with her task, selecting them from a great cluster that lay on the
table at her side. Eva picked up one or two and pressed them
languidly against her face while she asked the usual desultory
questions about the house and their mutual friends.
"Pamela went away this morning," she announced; "she came out
yesterday to bid me good-by."
Rachel went on with the roses. "She needs a change: she's fallen off
since last winter; Pamela's always in motion, like a merry-go-round."
"She thinks you look perfectly wretched."
"How complimentary! It seems we must have been taking stock of
each other without any illusions on either side."
"You do look badly, Rachel, so white! You aren't ill, are you?"
"Do I look any whiter than you do? Come, Eva, we can't expect to
look blooming; we've been through so much, you and I."
"I was in hopes I didn't show it; I can see that you do."
Rachel looked at her over the roses, a little vexed. "Well, you do
show it."
"Do I?"
Eva went over to the mirror and gazed at her own reflection. The
grace and loveliness of outline, the exquisite color of hair and eyes
remained, but her face—now that she looked at it in the full light of
the open door—was almost transparently pale. She sighed.
"I've gone off worse than Pamela!"
"With more cause, I'm sure," said Rachel bitterly.
"Oh, I've suffered!" Eva threw her two roses back on the table with
the petulant gesture of a child, "no one knows how I've suffered!"
Rachel picked up the discarded roses and put them carefully into the
vase. "Have you never thought of me, Eva?"
"That's one of the things that make it so bad, Rachel; I've thought of
it often. I know it must be dreadful for you, it must be!"
"I don't think that quite expresses it."
Rachel spoke dispassionately, but as she turned and stood facing
Eva, the ravages of pain were apparent in the dark shadows under
the eyes, the delicately hollowed cheeks, the tightening of the
sensitive lips. It had not diminished her beauty, which was less
dependent on color than Eva's, and the subtle charm of her
expression was deepened and accentuated; Eva felt it.
"Rachel, I'm certain that he—that he'll learn to love you better than
he ever loved me; I know he hates me now!"
"Can't you let him go out of your life altogether?"
Eva shook her head slowly. "How can I? Think of all it meant to us,
to you and me, Rachel! Besides, I've suffered."
Rachel looked at her with forbearance; she was unchanged after all,
and she was in need of pity and help like a child.
"You'll have to bear it, Eva; I have to."
"Then—" Eva dragged the words out—"you are wretched?"
"Why do you want to dwell on it? What good does it do? We've got
to bear it."
Eva caught Rachel by both arms, holding her and looking at her.
"Rachel, tell me, were you in love with Charter?"
Rachel recoiled, tried to drag herself away. "Why do you want to
know? What right have you to ask?"
Eva clung to her. "I must know, I must!"
But Rachel made no response; instead she eluded her sister's grasp
and went to the open door. She stood there, looking out past the
young hemlocks and the maples, across a field of wheat, where a
flock of crows skimming low over it showed black against the golden
grain. Suddenly she hid her face in her hands, and her whole slender
figure, shaken with emotion, quivered from head to foot.
"You needn't tell me," said Eva's voice behind her, "I know!"
There was a long silence. The hot, August sunshine filtered through
the foliage of the maples and flecked the gravel path with gold;
there was a dusky haze about the horizon, while the sky overhead
was vividly blue. A faint, hot wind ran over the yellow grain in long,
quivering waves and the vivid atmosphere seemed to pulsate and
throb with heat.
"Rachel, I can't bear it, it's too much—and I did it—I did it all!"
Poor Rachel turned and went back to the table and began
mechanically to arrange and rearrange the roses. "It's no use to talk
of it, Eva; it's over and done with now!"
"No, it isn't, it can't be! You've got to face it and so have I—" Her
voice broke with self-pity, but her grief for Rachel was quite as
sincere. She looked at her in anguish—"You must hate me!"
"Do you think hate made me do it?"
"No, you were an angel, but you're human; you must hate me now!"
"No, I don't hate you, but—sometimes—I've been very angry with
you, Eva. God knows I wish you'd never done it!"
"You've every right to hate me," the penitent lamented. "I—I lied
about you to save myself."
Rachel could endure no more; she covered her ears with her hands.
"Oh, Eva, please go away, let me be; I can't stand it!"
Eva looked at her a moment in silence and then ran out of the
house. She went home blindly, not feeling the heat, and following
the shade of the woodpath by instinct. Before her went the
anguished face of Rachel; she knew at last that she had ruined her
sister's life, she had lost all, and gained nothing. She had set out
gayly on the Way of the Transgressors; with bleeding feet she was
coming slowly and painfully back from the Way.
Astry was alone in the library when his wife entered it an hour later
and he rose and put down his book. Something in her face warned
him that a climax had been reached. Eva flung her big white hat on
the table and sank into a chair.
"Take me away, please, to-morrow," she said. "I can't stand it here a
moment longer."
Astry turned to the window and deliberately lit his pipe, but his hand
shook as he struck the match. Was this an appeal for help? Was she
coming back to him to save her?
"We'll go to-morrow," he said, and his voice was almost kind. His old
anger against her had died down to ashes, he no longer felt the rage
and jealousy of passion; the small figure in the chair and the bent,
golden head looked almost childish, and he no longer hardened his
heart.
XII
BELHAVEN came back from town rather late in the afternoon. He had
ridden out on the front seat of an open car, talking in a desultory
way to the gripman, chiefly because it seemed to afford him a
perverse pleasure to disregard the large sign overhead which
forbade conversation with the motorman. He was in a mood to enjoy
breaking all rules in a puny effort to feel independent. For, if the
truth be told, he had felt for months as if Astry had caught him and
chained him up, much as the infidel Turks used to chain their
Christian captives to the oars when their galleys went into battle.
Not even a long day at the club had relaxed his mood and he was
far from feeling as gay and debonair as he had appeared to Eva
when she had observed him through the leaves of the
rhododendrons. He was deeply vexed with himself, ashamed of the
part he had played, disgusted that he had sacrificed so much for a
feeling that had proved to be so ephemeral, that he had given up his
own freedom and even his self-respect to shield a woman who could
toss him aside, at the first alarm, as easily as she would have
discarded a soiled glove.
These reflections had become, of late, so habitual that Belhaven
found it difficult to control his passionate resentment; like Eva
herself, he was engrossed with the spectacle of his own misery, but
he longed, more keenly than she did, to visit it on some one else. It
added nothing to the joy of the situation either to be well aware of
Astry's scorn. It did not require a very delicate perception to
understand his attitude, and the bare politeness with which he
treated Belhaven made the latter long to strangle him. It amazed
him even now, in his moments of blind fury, that he had ever been
afraid to encounter Astry's anger, for it seemed to him that he
hungered exceedingly for an opportunity to avenge the
contemptuous scorn of the other man's manner. To use the
metaphor that came uppermost in Belhaven's own mind, he longed
"to have it out with him," and the very impossibility of any outbreak
that would lead to exposure made it all the more maddening. He
could not speak now without betraying Eva, and it seemed to be his
lot in life to swallow the polished insults of Eva's husband.
The heat of the August afternoon did not tend to decrease the heat
of his mood, and Belhaven, having left the tram at the corner of the
avenue, walked slowly along in the dust of the highway, using his
stick to knock off the heads of the wayside flowers with a vicious
stroke that was at least a small vent for an irritation that had
reached the limits of his endurance.
It was anything but a pleasure, therefore, to see Astry himself
approaching, seated alone in his smart little trap, driving one of the
finest of his thoroughbreds, while Belhaven was fairly in the way to
be covered with the dust from his wheels. But, in spite of the feeling
which he inspired, Astry was not inclined to dash the gravel of the
roadside upon his enemy; instead he drew up as he came within
earshot, and leaning over, with his whip-hand resting on the edge of
the seat, he called out, in a tone that was unconsciously that of
superiority and indifference, a perfectly casual greeting.
"I say, going straight home?"
The tone, as well as the look that accompanied this remark, affected
Belhaven almost as agreeably as a sudden attack by obnoxious
insects.
"Where did you suppose I was going?" he retorted, his face flushing
darkly with anger.
But Astry took no notice of this reply.
"Tell Rachel that we sail day after to-morrow. I've wired for
staterooms on the 'Marianna.' Some one failed at the last moment
and we got them."
Belhaven was sufficiently startled to answer more rationally. "Rather
sudden, isn't it? I thought you were going to Lenox."
Astry resumed his erect position and gathered up the reins. "Eva
simply went to pieces this morning," he said, meeting the other
man's look with a direct cold stare, "collapsed and begged me to
take her away at once."
"She looked perfectly well when I saw her last," Belhaven exclaimed,
in open surprise.
"Well, she isn't now; the doctor's just ordered a sea voyage. Tell
Rachel I said so."
"Extremely sorry, I'm sure," Belhaven stammered slightly, digging his
stick in the dirt.
But Astry merely nodded and drove on, his beautiful horse, already
restive at the delay, sweeping down hill and away at a rate of speed
that would have to be moderated at the city limits.
His brother-in-law, feeling figuratively, if not actually, deluged in the
dust from his wheels, walked slowly on, past the wide, Georgian
gateway and into the grove of cedars that led more directly to his
own house. As he went, his reflections were scarcely more agreeable
than they had been before this encounter, and he experienced a
feeling of bitterness at the thought that Eva always managed to
escape. She had escaped at his expense on a previous occasion, and
now, when the situation was so hideously unpleasant, she had only
to affect illness to induce a doctor to order her to Europe. The
convenience of this arrangement was too much like stratagem to
escape Belhaven's suspicions and it marked one more lap in the long
road that he had entered. He had learned, to his cost, that an
affection that can be so easily diverted from its lawful channel is,
after all, of too thin and desultory a quality to be worth the trouble
of capture. It was evident that Eva cared no more for him than she
had cared for her husband, but that she did care very devotedly for
herself, that she would never willingly permit a lovely hair of her
head to be injured, or suffer a single pang that she could escape.
And for this he had wrecked his life!
These thoughts, bitter enough in the first blaze of disillusionment,
brought him to the edge of the garden. Looking across it, he was
suddenly aware of Rachel, although she was quite unconscious of his
approach. The quaint flower garden, with its long rows of old box
and its gravel paths, lay on the east side of the house and, at this
hour of the day, was pleasantly shadowed and fragrant with flowers.
Rachel had planted many of the old-fashioned flower-beds herself
with that feverish energy that we display when it is necessary to find
some vent for our misery, some commonplace occupation that will
hide the suffering that it cannot heal.
At this moment she was kneeling in the gravel path beside a bed of
heliotrope, clipping away dead leaves and blossoms and rearranging,
with the aid of a trowel, some of the smaller plants. She was
bareheaded and the charming oval of her face was delicately framed
by the dusky rumple of her soft hair, while her white sleeves were
folded back above the elbow and she wielded her trowel with
dexterous fingers. The simplicity of her attitude and the earnestness
with which she delved after a vagrant plant, that had intruded itself
into the sacred precincts of her heliotrope, were as refreshing as a
bouquet of homely flowers in the gorgeously barren splendor of
Eva's drawing-room. It was just this thought, this impression of the
clear contrast between the two sisters, that arrested Belhaven at the
edge of the garden, and he stood, unobserved, watching Rachel as
she lifted her stray deftly out of the earth and, making another hole
for it in a bed of friendly petunias, set it down and pressed the soil
back around the roots with the tender care that makes the lover of
Nature respect the life of the humblest seedlings of the garden. He
noticed, too, as Eva had noticed, the delicate hollows in the cheeks,
the shadows under the eyes, and the tight line of the lips, and he
fancied that there was a greater need here for care and a change of
scene than existed in Eva's case. But most of all the homely
occupation, the apparent absorption in an uninteresting task,
surprised him; he had been accustomed all his life to women of
fashion, to the idle butterflies of a society that drifted from
Washington to Newport or Lenox, the Hot Springs or Florida, when it
did not immediately take flight to London, Paris or the Riviera. To
see a young and beautiful woman kneeling on the ground to delve in
a flower-bed was something so new that it interested him. After all,
he reflected, Rachel had kept her word; she was unconventional and
she was always doing something that he did not expect. It was at
this point in his reflections that she looked up and suspended her
labors long enough to make a remark so conventional that he almost
smiled.
"You found it hot coming out, didn't you?"
"No, I came on the front of the tram; no one felt the weather but an
old colored woman who was carrying a watermelon."
Rachel went on patting the earth down with her trowel. "The melon
will repay her for that. I thought Harter was to go for you in the
motor."
"He missed me then." Belhaven had come down between the box
borders and stood now, with his hands in his pockets, observing her
plants. "I say, where did you get all that heliotrope? I didn't know
there were so many shades."
"Didn't you? I bought the plants; you know it was too late to start
them from seeds when—I came—" the instant of hesitation was
perceptible and he noticed the delicate color that softly suffused the
cheek that she tried to turn away from him.
He made no immediate reply and the soft pat of her trowel went on.
The green shadows were lengthening across the long lawns and
there was no other sound but the hum of a bumblebee who kept
trying to intrude into the heliotrope.
At last he spoke with an effort. "I just met Astry; he sent a message
to you."
She suspended her trowel without looking up. "Yes?"
"They sail for Europe on Saturday."
Rachel stopped short in her work. "Going to Europe on Saturday?
Why, I can't understand—Eva was here this morning."
"Astry says she's broken down and the doctor's ordered a trip to
Europe."
"She said nothing about it; I—I thought her quite well."
"So did I," said Belhaven dryly, "but it seems that the doctor was
called in."
Rachel rose, gathering up her trowel and shears. "I must go and
'phone to her; I can't understand."
Belhaven moved about among the flower-beds, examining them
much as an explorer would look at a newly discovered specimen. "I
think you need a change yourself," he said at last; "you've had as
much of it as—the rest of us."
"Oh, I can't go!"
Something in her tone made him turn sharply.
"You mean you can't go anywhere with me; that I'm too horrible to
take along?"
She flung him an eloquent look. "Need we talk of such things at all?"
He frowned. "To tell you the truth I hate to feel that I'm a—a sort of
a crocodile to you."
In spite of herself Rachel laughed hysterically. "I often think I must
be almost that to you!" she replied.
He hesitated; a strange feeling had taken possession of him, the old
landmarks were being swept away, he no longer belonged to the
false and trivial world that had once been his only idea of life. He
was shipwrecked, but across the sea he seemed to catch glimpses of
a lovelier, saner existence,—"he who loses his life shall find it." More
than once lately he had remembered the words though he could not
remember where he had seen them. But he had not the courage to
say any of these things to his wife.
"I wish you'd let me take you away; you'd be as free of my society
as you are here,—more so, for we wouldn't be so observed by our
friends,—and I think the change would be a blessing to you."
Rachel blushed slightly again. "Thank you," she said quite gently,
"but—I just can't—not now. Later I'd like to go to Boston. I think you
belong to clubs there, don't you? And I could get a chance to go out
to Cambridge; my aunt is coming back and—and I'd like to go there
to her."
He faced her without coming a step nearer, but with a new and quite
humble air. "I wish you'd feel that I really want to please you," he
said.
She looked down at the trowel in her hands and saw the marks of
the earth on her fingers. "Thank you," she said, almost shyly, and
went away from him across the lawn, and he saw her, a moment
later, disappear into the house.
"She's a good sport," he said to himself, in the language that was
most familiar to him, "a downright good sport, and I've been a
beastly cad."
XIII
ALL this while Charter had been away. He had left Washington
almost immediately and was taking his leave out of the sphere of its
influence; he even dreaded the possibility of a summons to report at
the War Department. Not that he was afraid to meet the problem
and grapple with it, but he was determined to conquer it, and
Rachel's very presence, under the altered conditions, had been too
distracting a pain. If he was ever to see his way through it, he must
see it without her. She had removed herself from his life and he had
lived so long near the thought of her that her absence seemed to
take the magic part of life away, to leave him a bare skeleton of
meaningless days.
At first it was indeed impossible to believe in their final separation;
there seemed to exist some indestructible tie between them,
spiritual and therefore immortal, born of their community of soul,
their absolute sympathy, their old happy comradeship. He could not
quite believe that Rachel did not belong to him, that, instead, she
belonged to Belhaven, and it was the necessity of recognizing that
which forced him to the overt act of flight. He must feel that he was
mistaken, that no infrangible bond existed between their spirits, that
he was free as Rachel had shown that she felt herself to be free. He
could not have explained this feeling, his folly as he called it, to
himself, but he tried to urge on the process of dissolution, to slip out
of the shackles, and the fact that he knew intuitively that Rachel was
unhappy had not made the process of forgetting easier. To stand
outside of her life, put out of it by her own act, and to witness her
misery was like pouring gall into his wound; even his magnificent
courage blenched before it.
For a nature like his absence does very little; life regained its normal
aspect, but individually he felt lopsided. Rachel's disappearance from
her place in his plans and his hopes left them toppling over, only half
complete, and he was continually groping about for a solution of his
problem, a way to regain the old, equable poise. He even wanted to
go back to the Philippines, a desire which made his brother officers
smile sardonically. They thought that John had always been a fool,
and now he had apparently become besottedly fond of living in a
hole with the sole object of relieving the troubles of a few common
soldiers and helping the Filipinos.
The common soldiers and the Filipinos were fervent in their desire to
have John back but he did not get there. In fact he found himself
suddenly, and quite unexpectedly, appreciated. The War Department
was not disposed to let him hide his light under a bushel. For some
unheard of reason they began to realize his value. He did not get his
orders to the Philippine Islands, but he got a medal from Congress
for his distinguished courage at Caloocan, a matter that seemed to
have been just remembered. If he had been willing, young Captain
Charter would have been quite a hero; as it was, he had to spend
most of his time, while visiting his aunt at Newport, dodging social
lion-tamers, and he began to dread the sight of a motor filled with
ladies in fashionable attire making its way to the front door. If he
had the habit of command he had not the attendant love of publicity,
and he hated to move continually before the public eye, garbed, as it
were, in the pomp and panoply of war. He went on obscure fishing
trips with old seafaring characters; he went tramping in the woods
and fields; but he could not escape the incense of popular
admiration as a hero, nor the disturbing ripple of Pamela's letters.
For Pamela kept him informed; from her he heard that Eva had
broken down in the heat of August and the Astrys had consequently
taken a flying trip to Europe. About Rachel his fair correspondent
was more discreet, but she let drop a hint now and then, and he
knew when, at the approach of fall, the Belhavens went away
together for a brief visit in Boston, Aunt Drusilla Leven having
returned from her exile to her little house in Cambridge, where she
was likely, so Pamela wrote, to have to live on salt cod and kippered
herring until the first of January, when her dividends would have at
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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like