100% found this document useful (4 votes)
148 views

Download ebooks file Object-Oriented Python 1st Edition Irv Kalb all chapters

Kalb

Uploaded by

irlanelinne
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
148 views

Download ebooks file Object-Oriented Python 1st Edition Irv Kalb all chapters

Kalb

Uploaded by

irlanelinne
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Get ebook downloads in full at ebookmeta.

com

Object-Oriented Python 1st Edition Irv Kalb

https://ebookmeta.com/product/object-oriented-python-1st-
edition-irv-kalb/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


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

Object-Oriented Python 1st Edition Irv Kalb

https://ebookmeta.com/product/object-oriented-python-1st-edition-irv-
kalb/

ebookmeta.com

Object-Oriented Python: Master OOP by Building Games and


GUIs 1st Edition Irv Kalb

https://ebookmeta.com/product/object-oriented-python-master-oop-by-
building-games-and-guis-1st-edition-irv-kalb/

ebookmeta.com

Python 3 Object oriented Programming Building robust and


maintainable software with object oriented design patterns
in Python 2nd Edition Phillips
https://ebookmeta.com/product/python-3-object-oriented-programming-
building-robust-and-maintainable-software-with-object-oriented-design-
patterns-in-python-2nd-edition-phillips/
ebookmeta.com

The World Series Allan Morey

https://ebookmeta.com/product/the-world-series-allan-morey/

ebookmeta.com
Monkey King Volume 11 Fight to the Death 1st Edition Wei
Dong Chen Chao Peng

https://ebookmeta.com/product/monkey-king-volume-11-fight-to-the-
death-1st-edition-wei-dong-chen-chao-peng/

ebookmeta.com

Tribe Master 3 A Fantasy Harem Adventure 1st Edition Noah


Layton

https://ebookmeta.com/product/tribe-master-3-a-fantasy-harem-
adventure-1st-edition-noah-layton/

ebookmeta.com

Delivering on the Promise of Democracy Visual Case Studies


in Educational Equity and Transformation 1st Edition
Sukhwant Jhaj
https://ebookmeta.com/product/delivering-on-the-promise-of-democracy-
visual-case-studies-in-educational-equity-and-transformation-1st-
edition-sukhwant-jhaj/
ebookmeta.com

Introducing Translation Studies Theories and Applications


5th Edition Jeremy Munday

https://ebookmeta.com/product/introducing-translation-studies-
theories-and-applications-5th-edition-jeremy-munday/

ebookmeta.com

Framing the Sexual Subject The Politics of Gender


Sexuality and Power Richard Parker (Editor)

https://ebookmeta.com/product/framing-the-sexual-subject-the-politics-
of-gender-sexuality-and-power-richard-parker-editor/

ebookmeta.com
Global Politics A New Introduction 3rd Edition Jenny
Edkins Editor Maja Zehfuss Editor

https://ebookmeta.com/product/global-politics-a-new-introduction-3rd-
edition-jenny-edkins-editor-maja-zehfuss-editor/

ebookmeta.com
CONTENTS IN DETAIL

TITLE PAGE

COPYRIGHT

DEDICATION

ABOUT THE AUTHOR

ACKNOWLEDGMENTS

INTRODUCTION
Who Is This Book For?
Python Version(s) and Installation
How Will I Explain OOP?
What’s in the Book
Development Environments
Widgets and Example Games

PART I: INTRODUCING OBJECT-ORIENTED


PROGRAMMING

CHAPTER 1: PROCEDURAL PYTHON EXAMPLES


Higher or Lower Card Game
Representing the Data
Implementation
Reusable Code
Bank Account Simulations
Analysis of Required Operations and Data
Implementation 1—Single Account Without Functions
Implementation 2—Single Account with Functions
Implementation 3—Two Accounts
Implementation 4—Multiple Accounts Using Lists
Implementation 5—List of Account Dictionaries
Common Problems with Procedural Implementation
Object-Oriented Solution—First Look at a Class
Summary

CHAPTER 2: MODELING PHYSICAL OBJECTS WITH OBJECT-


ORIENTED PROGRAMMING
Building Software Models of Physical Objects
State and Behavior: Light Switch Example
Classes, Objects, and Instantiation
Writing a Class in Python
Scope and Instance Variables
Differences Between Functions and Methods
Creating an Object from a Class
Calling Methods of an Object
Creating Multiple Instances from the Same Class
Python Data Types Are Implemented as Classes
Definition of an Object
Building a Slightly More Complicated Class
Representing a More Complicated Physical Object as a Class
Passing Arguments to a Method
Multiple Instances
Initialization Parameters
Classes in Use
OOP as a Solution
Summary

CHAPTER 3: MENTAL MODELS OF OBJECTS AND THE


MEANING OF “SELF”
Revisiting the DimmerSwitch Class
High-Level Mental Model #1
A Deeper Mental Model #2
What Is the Meaning of “self”?
Summary

CHAPTER 4: MANAGING MULTIPLE OBJECTS


Bank Account Class
Importing Class Code
Creating Some Test Code
Creating Multiple Accounts
Multiple Account Objects in a List
Multiple Objects with Unique Identifiers
Building an Interactive Menu
Creating an Object Manager Object
Building the Object Manager Object
Main Code That Creates an Object Manager Object
Better Error Handling with Exceptions
try and except
The raise Statement and Custom Exceptions
Using Exceptions in Our Bank Program
Account Class with Exceptions
Optimized Bank Class
Main Code That Handles Exceptions
Calling the Same Method on a List of Objects
Interface vs. Implementation
Summary

PART II: GRAPHICAL USER INTERFACES WITH


PYGAME

CHAPTER 5: INTRODUCTION TO PYGAME


Installing Pygame
Window Details
The Window Coordinate System
Pixel Colors
Event-Driven Programs
Using Pygame
Bringing Up a Blank Window
Drawing an Image
Detecting a Mouse Click
Handling the Keyboard
Creating a Location-Based Animation
Using Pygame rects
Playing Sounds
Playing Sound Effects
Playing Background Music
Drawing Shapes
Reference for Primitive Shapes
Summary

CHAPTER 6: OBJECT-ORIENTED PYGAME


Building the Screensaver Ball with OOP Pygame
Creating a Ball Class
Using the Ball Class
Creating Many Ball Objects
Creating Many, Many Ball Objects
Building a Reusable Object-Oriented Button
Building a Button Class
Main Code Using a SimpleButton
Creating a Program with Multiple Buttons
Building a Reusable Object-Oriented Text Display
Steps to Display Text
Creating a SimpleText Class
Demo Ball with SimpleText and SimpleButton
Interface vs. Implementation
Callbacks
Creating a Callback
Using a Callback with SimpleButton
Summary

CHAPTER 7: PYGAME GUI WIDGETS


Passing Arguments into a Function or Method
Positional and Keyword Parameters
Additional Notes on Keyword Parameters
Using None as a Default Value
Choosing Keywords and Default Values
Default Values in GUI Widgets
The pygwidgets Package
Setting Up
Overall Design Approach
Adding an Image
Adding Buttons, Checkboxes, and Radio Buttons
Text Output and Input
Other pygwidgets Classes
pygwidgets Example Program
The Importance of a Consistent API
Summary

PART III: ENCAPSULATION, POLYMORPHISM, AND


INHERITANCE

CHAPTER 8: ENCAPSULATION
Encapsulation with Functions
Encapsulation with Objects
Objects Own Their Data
Interpretations of Encapsulation
Direct Access and Why You Should Avoid It
Strict Interpretation with Getters and Setters
Safe Direct Access
Making Instance Variables More Private
Implicitly Private
More Explicitly Private
Decorators and @property
Encapsulation in pygwidgets Classes
A Story from the Real World
Abstraction
Summary

CHAPTER 9: POLYMORPHISM
Sending Messages to Real-World Objects
A Classic Example of Polymorphism in Programming
Example Using Pygame Shapes
The Square Shape Class
The Circle and Triangle Shape Classes
The Main Program Creating Shapes
Extending a Pattern
pygwidgets Exhibits Polymorphism
Polymorphism for Operators
Magic Methods
Comparison Operator Magic Methods
A Rectangle Class with Magic Methods
Main Program Using Magic Methods
Math Operator Magic Methods
Vector Example
Creating a String Representation of Values in an Object
A Fraction Class with Magic Methods
Summary

CHAPTER 10: INHERITANCE


Inheritance in Object-Oriented Programming
Implementing Inheritance
Employee and Manager Example
Base Class: Employee
Subclass: Manager
Test Code
The Client’s View of a Subclass
Real-World Examples of Inheritance
InputNumber
DisplayMoney
Example Usage
Multiple Classes Inheriting from the Same Base Class
Abstract Classes and Methods
How pygwidgets Uses Inheritance
Class Hierarchy
The Difficulty of Programming with Inheritance
Summary

CHAPTER 11: MANAGING MEMORY USED BY OBJECTS


Object Lifetime
Reference Count
Garbage Collection
Class Variables
Class Variable Constants
Class Variables for Counting
Putting It All Together: Balloon Sample Program
Module of Constants
Main Program Code
Balloon Manager
Balloon Class and Objects
Managing Memory: Slots
Summary

PART IV: USING OOP IN GAME DEVELOPMENT

CHAPTER 12: CARD GAMES


The Card Class
The Deck Class
The Higher or Lower Game
Main Program
Game Object
Testing with __name__
Other Card Games
Blackjack Deck
Games with Unusual Card Decks
Summary

CHAPTER 13: TIMERS


Timer Demonstration Program
Three Approaches for Implementing Timers
Counting Frames
Timer Event
Building a Timer by Calculating Elapsed Time
Installing pyghelpers
The Timer Class
Displaying Time
CountUpTimer
CountDownTimer
Summary

CHAPTER 14: ANIMATION


Building Animation Classes
SimpleAnimation Class
SimpleSpriteSheetAnimation Class
Merging Two Classes
Animation Classes in pygwidgets
Animation Class
SpriteSheetAnimation Class
Common Base Class: PygAnimation
Example Animation Program
Summary

CHAPTER 15: SCENES


The State Machine Approach
A pygame Example with a State Machine
A Scene Manager for Managing Many Scenes
A Demo Program Using a Scene Manager
The Main Program
Building the Scenes
A Typical Scene
Rock, Paper, Scissors Using Scenes
Communication Between Scenes
Requesting Information from a Target Scene
Sending Information to a Target Scene
Sending Information to All Scenes
Testing Communications Among Scenes
Implementation of the Scene Manager
run() Method
Main Methods
Communication Between Scenes
Summary

CHAPTER 16: FULL GAME: DODGER


Modal Dialogs
Yes/No and Alert Dialogs
Answer Dialogs
Building a Full Game: Dodger
Game Overview
Implementation
Extensions to the Game
Summary

CHAPTER 17: DESIGN PATTERNS AND WRAP-UP


Model View Controller
File Display Example
Statistical Display Example
Advantages of the MVC Pattern
Wrap-Up

INDEX
OBJECT-ORIENTED PYTHON

Master OOP by Building Games and GUIs

by Irv Kalb
Object-Oriented Python. Copyright © 2022 by Irv Kalb.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying, recording, or by any information storage or
retrieval system, without the prior written permission of the copyright owner and the publisher.
First printing
25 24 23 22 21 1 2 3 4 5 6 7 8 9
ISBN-13: 978-1-7185-0206-2 (print)
ISBN-13: 978-1-7185-0207-9 (ebook)
Publisher: William Pollock
Managing Editor: Jill Franklin
Production Manager: Rachel Monaghan
Production Editor: Kate Kaminski
Developmental Editor: Liz Chadwick
Cover Illustrator: James L. Barry
Interior Design: Octopod Studios
Technical Reviewer: Monte Davidoff
Copyeditor: Rachel Head
Compositor: Maureen Forys, Happenstance Type-O-Rama
Proofreader: Paula L. Fleming
Indexer: Valerie Haynes Perry
The following images are reproduced with permission:
Figure 2-1, photo by David Benbennick, printed under the Creative Commons Attribution-Share
Alike 3.0 Unported license, https://creativecommons.org/licenses/by-sa/3.0/deed.en.
For information on book distributors or translations, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900; info@nostarch.com
www.nostarch.com
Library of Congress Cataloging-in-Publication Data
Names: Kalb, Irv, author.
Title: Object-oriented Python: master OOP by building games and GUIs / Irv Kalb.
Description: San Francisco : No Starch Press, [2021] | Includes index. |
Identifiers: LCCN 2021044174 (print) | LCCN 2021044175 (ebook) | ISBN
9781718502062 (print) | ISBN 9781718502079 (ebook)
Subjects: LCSH: Object-oriented programming (Computer science) | Python
(Computer program language)
Classification: LCC QA76.64 .K3563 2021 (print) | LCC QA76.64 (ebook) |
DDC 005.1/17--dc23
LC record available at https://lccn.loc.gov/2021044174
LC ebook record available at https://lccn.loc.gov/2021044175
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc.
Other product and company names mentioned herein may be the trademarks of their respective
owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are
using the names only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every
precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc.
shall have any liability to any person or entity with respect to any loss or damage caused or alleged to
be caused directly or indirectly by the information contained in it.
Other documents randomly have
different content
“Sir,” she said to the painter, “I can only offer you a lock of hair.”
And taking the gaoler’s scissors, she cut a lock of the wonderful
hair.
A priest coming, she said, “I thank those who have been kind
enough to send you, but I do not require your services. The blood I
have spilt, and my own, which I am about to shed, are the only
sacrifices I can offer the Eternal.”
The executioner now cut off her hair, and flung over her head the
red garment.
“This,” she said, “is the toilette of death, arranged by somewhat
rude hands, but it leads to immortality.”
As she stepped upon the cart, such as carried all those
condemned to death to the place of execution, a violent storm burst
over Paris. Women danced about the death-cart, uttering
imprecations; hers was the only calm face to be seen. Strangely
enough, the rain wetting the red flannel—her only covering to the
waist—it clung to her skin, and betrayed her to be exquisitely
formed, especially as her hands were so tied behind her that she
was forced to hold herself upright.
As she neared the scaffold, the sun appeared, and the gold
threads in her hair shone out magnificently.
The leaders of the rebellion, Danton, Robespierre, Camille
Desmoulins, standing at a window, saw her pass. She had preserved
them from Marat, but, at the same time, she had shown how a
tyrant could be slain. She saved their lives by her act; but she
taught, also, how they might be taken.
One Adam Lux, a German, was hopelessly stricken by love as she
passed along. He followed to the scaffold’s feet, asking to die with
her.
Reaching the scaffold, she turned pale, and, for one moment,
shrank; but the next, recovering herself, ascended the steps as
rapidly as her long red dress and pinioned arms would allow.
When the executioner pulled down her dress, that her neck might
be bare, she was for the last time outraged while living. She placed
herself upon the plank, and, the next moment, her head fell.
Legros, a miserable scaffold-dog, took up the head by the
remaining hair, and struck at the cheeks. It is said the skin grew
scarlet, as though the modesty of Charlotte Corday outlasted her
life.
Did her face change color? Some hold that the head has
consciousness and power after being severed from the body, and
that it can see and hear. Nay, it was urged during the Revolution that
the passion of the heads remained, because the interior of the
wicker baskets in which the heads were carried away were often
found to be gnawed, as though the teeth of the heads gnashed after
separation from the body. For my part, I believe that this gnawing
was effected by rats, which at that time, even more than now,
overran Paris.
Such was the death of Marat—of his murderer, whom we cannot
praise. But who can blame her? Assuredly her death was necessary
to purge her of assassination, to some extent.
Adam Lux, wild with love, published a defence of Charlotte Corday.
He was seized, and, three days afterwards, died by the very knife
which destroyed her life.
Chénier, the patriotic poet, sang her heroism. He was soon
arrested, and therefore beheaded.
But what good had Charlotte Corday done?
She had strengthened the love of the people for desperate
measures; she had made a martyr of their most foul leader. She
gave a dignity to those who advocated the scaffold. The liberal
twenty-two knew that this last act annihilated them.
C H A P T E R LV I I I .
MARIE A N TO I N E TT E .

The Convention ordained the worship of Marat, and cast his


corpse to the people as an idol.
He was called Cæsar, and his funeral was modelled upon the
historical narrative of that given by Rome to the great Julius.
The body was carried by torchlight to the garden of the house in
which he made his most inflammatory speeches; and there he was
buried under trees heavily laden with countless brilliantly-illuminated
paper lamps.
His head was placed in an urn, and hung in the centre of the
Convention. His memory was decreed an altar, and at its foot his
admirers appropriately called for blood.
The enemy was now approaching on all sides, and thousands
more Royalists were in array.
Meanwhile Danton was sinking in estimation, Robespierre rising,
for Robespierre was a patient man.
Danton, dazzled with his new wife, wished to live the life of a
small country gentleman. It was too late.
Robespierre was breaking in health, but his temperance would
stand him in good stead of health for a long while. His motto was
“Wait.”
The Committee of Public Safety was meanwhile reaping a rich
harvest of death.
Money was no longer to be seen.
Bread was rare.
People were dying of starvation (especially the old) in every street.
The more cruel of the Conventionists carried by acclamation these
decrees—the true legal inauguration of the Reign of Terror:
“Six thousand soldiers and twelve hundred artillerymen to do
blindly the bidding of the Committee of Public Safety.
“All men who have been in the Government occupation during the
late King’s life, to quit Paris.
“The delivery of the Revolutionary Tribunal of the Moderate
Conventionists.
“The right to search any house at any hour of the night.
“The transportation beyond the seas of every common woman in
the land.
“Finally, the payment of workmen who should leave their shops to
follow up the public service.”
By these measures the mob were not only encouraged to take life,
but paid to do it. Nothing could save such a system resulting, if long
continued, in national death!
By the way, Sunday was chosen as the best day for working these
mob committees.
This was followed by Merlin’s decree, which provided for the arrest
(without proof) of any suspected person, and of all those who, not
working, were enabled to live in a better condition than one of
penury. This was an attack upon all people who had hidden money.
In fact, starvation had by this time become the only mode of
avoiding the guillotine.
Prisons were not large enough to contain prisoners, and all the
confiscated churches were converted into gaols. Death was decreed
for almost every act of life—certainly for every act of pity.
A hundred men, less two, were beheaded in sixty days in Paris
alone.
The Queen was too noble a victim to escape.
The Convention suddenly ordered her trial, and commanded her
separation from the two children.
Now all the lethargy which has possessed her since the King’s
death departs, and she becomes as a lioness fighting for her young.
By this time, all the beauty of Marie Antoinette had vanished, and
there remained a very broken old woman, aged about a little more
than thirty, with very scanty white hair, falling in patches from an
almost bald head. The body, as the soul, had shrunken—a skeleton
remained, covered with mere skin.
This was the Queen, who leapt into life when her dulled hearing
comprehended that she was to be separated from her children. They
had but the mercy only to remove the son.
The boy clung to his mother, who lost all dignity, dug her nails into
the child’s flesh, and called upon the men to kill them both.
For two hours this lasted, and then she became a woman again—a
mother; and dressing him to look as smart as possible, she gave him
up with her own hands to his gaoler, Simon, who took him at once to
the room where the child was destined to die. For two days and
nights the child lay upon the floor, taking neither food nor drink.
The Queen never took her son in her arms. He was to outlive her
but a little time, and then die of sheer ill-usage and neglect.
The Queen, however, still had her husband’s sister and her
daughter with her. The only consolation they had, was ascending to
the platform of their tower, to catch a glimpse of the boy on the
platform of the other tower.
Simon’s work it was to deprave the body and soul of the wretched
child. He forced him to drink strong wine, and made him answer to
the name of “Wolf.” He beat him if he wept, encouraged him to
every possible disgusting act, and compelled him to sing obscene
songs, while he (his master) smoked and drank.
Once, he nearly destroyed one of the poor Prince’s eyes; at
another, he raised a poker against him. Sometimes he was kind;
and, upon one occasion, he said, “Capet, if the soldiers come and
deliver you, what will you do?”
“Forgive you,” said the child.
The man Simon actually wept, but he cried immediately
afterwards, “There’s some of the blood of the lion in the whelp.”
In the middle of the night of the 2nd of August, the Queen was
awakened, and told she was to be removed alone, to another prison.
In vain the women threw themselves at the feet of the men. They
had but their duty to do.
The Queen was compelled to dress before them, while they
ransacked the room, and seized every little object the Queen still
retained. The miserable creatures left her a handkerchief.
And now, exactly as Louis XVI had told his children to forgive their
enemies, so now desolate Marie Antoinette told her daughter, in her
last words to the poor child, to forgive those who parted them.
“I give my children to you, sister. Be a second mother to them.”
For precisely as Louis appears to have had no conception of the
monstrosity of putting a woman to death, so the Queen, in leaving
the Temple, appears not to have supposed for one moment that the
Princess Elizabeth would be claimed by the scaffold,—she who had
led the life of a true woman, who had nursed and helped the people,
and never joined in the frivolities of the Court.
The Queen was taken to the prison of the Conciergerie, which is
composed of the dungeons below high water mark, to be found
amongst the foundations of the Palace of Justice.
To a wretched cell, having in one corner a straw bed, and by the
light of one candle, was the ex-Queen taken.
A woman desirous of death in the dungeon of a stronghold, and
yet they only believed her safe when two soldiers, swords drawn,
stood at the outer door watching, with orders not to lose sight of the
Widow Capet, even when asleep.
Madam Richard, that good woman who tended Charlotte Corday in
her last moments, was the Queen’s most humane gaoler. She found
something like furniture for the cell, procured wholesome food for
the captive, and often brought a low-whispered message from the
royal prisoners still in the Temple.
A little while, and the dampness of the cell rotted the Queen’s only
dresses—two very common ones; and her underclothing becoming
in tatters, she was half naked.
CHAPTER LIX.
M A R I E A N T O I N E T T E F I N D S P E A C E AT L A S T.

Marie Antoinette in her last prison, however, was not without


pitying friends. The fierce communists ordered that she should drink
the water of the Seine, drawn as it flowed past her prison-walls; but
an honest couple, named Bault, obtained the posts of chief gaolers
at the Conciergerie, in the full aim of assuaging the Queen’s
wretchedness. Instead of Seine water, the poor prisoner found daily
in her cell refreshing draughts of water drawn from that well at
Versailles which was the Queen’s chief cellar. She was a great water
drinker.
Madame Bault, to affect harshness, never entered the Princess’s
cell, asserting that to do so was to be contaminated. The royal
tradespeople of former days—especially the fruit-women—brought
little offerings secretly; and so it came about that the Queen, in her
last prison and days, ate such pure, simple meals as those which
had been her favorite food in the old days—a piece of melon, a
handful of figs, a little bread and a glass of water from her favorite
well.
The two gowns which the Queen possessed—one white, the other
black,—and which she wore alternately, soon fell to pieces in the
damp prison. Her underclothing was always damp when put on, and
often her shoes would be completely wet; for between her and the
river there was only the part protection of a wall.
Human nature demands some work. Not allowed writing or sewing
materials (Bault’s daughter mended the Queen’s tatters, and gave
away the little fragments which she cut away in the process as relics
of the poor lady), with a pin she scratched her thoughts upon the
driest portion of the walls of her prison. After her death many of
these sentences were copied by one of the commissioners. They
were mostly German and Italian verses bearing reference to her
fate, and little Latin verses from the Psalms. No French did she use,
for she had been brought into the land where that language was
spoken to be cast into prison, and to suffer death. The drier walls
were covered with these mute appeals.
Some idea may be gained of the cruelty exercised towards the
desolate prisoner, when she, asking for a lighter coverlet, and Bault
forwarding the request to a high authority, the latter received this
reply:—
“Take care! Another sign of sympathy such as that, and you will
visit the guillotine before she does!”
Another shape of industry did the poor Queen find. She wished to
leave her daughter a memento of her last days, and she had nothing
to give; so she converted a couple of bone toothpicks into knitting
needles, pulled some worsted shreds from the heavy old coverlet
which they refused to replace with a lighter, and knitted a—garter.
This she, dropped near the friendly Bault, who, with the heart of a
father, understanding the poor little bit of workmanship, let fall his
handkerchief, and so possessed himself of the little treasure. After
her death the tribute reached the young Princess for whom it was
worked—truly a message from the grave.
A few days before her trial, an order, possessed by something of
mercy, arrived, by force of which she was relieved from the
continuous stare of the guard set to watch her. By this relief, she
was enabled to kneel, from which act she had been warned
throughout her confinement.
On October 13th, Fouquier-Tinville notified to Marie Antoinette the
fact of her having been indicted for high treason.
She listened to the reading of the indictment as though to a
death-warrant—the shape, in fact, it really took.
As a matter of form, she chose two counsel for her defence—men
who had secretly sought the appointment, and who, afterwards, of
course, paid for their pity with their lives.
On the 14th, at noon, she made as elegant a toilette as she could
—hid the rags and the patchiness of her white hair as much as
possible, and went up the stone stairs of her dungeon to the
judgment-hall above her prison. The passages were full of people,
who reviled her as she passed along. She bore her head well up, but
she could not change the fallen mouth, the pinched nose, tarnished
eyes, and shrunken, weakened body. But the black circles round
those eyes artificially increased their failing brilliancy, and they fired
glances of scorn and fearlessness at her gibing enemies. She had
never possessed the humble, religious feeling and sweet patience
which distinguished Louis. A perfectly pure woman, at heart, she
was somewhat of a Voltairean; she despised death, and feared no
power. We are as we are made; so, in her final trial, she met the
scowls of the people, chiefly of women, face to face. Some
authorities say that one girl uttered a cry of pity as the Queen
passed—she was strangled. These unsexed wretches had
undertaken to accompany the Queen to the scaffold with every
possible indignity.
And she stands before her—judges.
“What is your name?”
“I am called Marie Antoinette, of Lorraine, in Austria,” she replies,
in a low, musical voice.
“Your condition?”
“Widow of Louis, formerly King of the French.”
“Your age?”
“Thirty-seven.”
Louquier-Tinville now read the indictment. It was the summing up
of all her declared crimes of high birth, condition, and rank. She was
quite guilty of all these things. The chief accusations were merely
echoes of all that had been whispered of her in the foulest places.
She was accused of prodigality, licentiousness, and treason to
France.
She showed no sign of emotion, beyond an unheeded movement
of the fingers over the bar of a chair, as though they were recalling
some half-forgotten music.
She answered all questions quite patiently, showed sorrow only
when reference was made to the Princess de Lamballe, and only lost
her quietude when one Hébert was called. It is to be hoped this man
was mad. At all events, he spoke to the Queen’s acts while in the
Temple; declared that she was depraved and debauched, and that
she had even corrupted her own son, “that she might poison his
body and his soul, and so reign in his name over the ruin of his
understanding.”
This man was mad—there can be no doubt upon the point: he
even included saintly Madame Elizabeth in this frantic idiotic
accusation.
Heaven be thanked, those present turned upon him, and cried
“Shame!” The Queen herself shrank, raising her hand as though to
guard her from the wretch.
But one juryman was nearly as bad as Hébert.
“Why does not the accused answer?” this foul wretch asked.
“I do not answer,” she said—and once again, it is said, she looked
radiantly beautiful in her momentary indignation—“because these
are accusations to which nature refuses a reply.”
She turned to the women, with whom the court was crowded.
“I appeal from him to all mothers present.”
To the honor of these women be it said, they cried Hébert down—
and so he passes out of this history.
The Queen met questions having reference to the King with equal
calmness. It being alleged that she endeavored to obtain
ascendancy over him through his mental weakness, she replied, “I
never knew that character of him. I was but his wife, and it was my
duty and my pleasure to yield to his will.”
By not one word, tending to save herself, did she injure the
memory of her husband.
One line in the trial is enough to show what a mockery it was.
The Public Prosecutor cried, “All France bears witness against this
woman!”
For form’s sake, the jury deliberated an hour. She was recalled to
hear her sentence, but the cheering and screaming of the people
told her its terrors before the judge spoke—death!
Nine months since the King died, and now there was an end to
her weary waiting.
Asked if she had anything to say why the sentence of death
should not be carried out, she respected herself in her very silence,
and turned away, as though quite prepared for execution.
It was now five in the morning, and her last day was come. At
half-past five she was permitted to write a letter to the King’s sister,
Madame Elizabeth. This lady never saw it. The document was found
long afterwards amongst the papers of one Couthon.

“I write to you, my sister,” she begins, “for the last time. I have
been condemned, not to an ignominious death—that only awaits
criminals—but to go and rejoin your brother. Innocent as he, I hope
to show such firmness as the King’s in his last moments. I grieve
bitterly at leaving my poor children. You know that I lived but for
them and you—you who, in your love, have sacrificed all for us. I
learnt, at my trial, that you are separated from my little girl. In what
a position I leave you! I dare not write to her; they would not give
her my letter, and, indeed, I do not know that you will receive this.”

Some words of this final letter are inexpressibly touching. “Let my


son never forget his father’s last words. Let him never seek to
avenge our deaths!”
She then goes on to apologize for the child’s possible conduct to
her, after the influence over him necessarily obtained by Simon, his
tutor, and meekly she urges that he is so young he is incapable of
knowing what he does.
“Think of me always,” she says, in conclusion. “Good heaven, and
my children! How heart-rending it is to leave them for ever—for
ever!”
This letter being finished, she kissed each page lovingly, and
folded it.
So far, the Republic had not entirely declared against high heaven,
and priests were still recognised by those who had subscribed to the
articles of the Revolution, and one of these men was offered to
Marie Antoinette to aid her in her last moments. She refused to see
him. The Convention (still sitting) insisted upon one of these officials
accompanying her to the scaffold. There was no devotion amongst
them. All hesitated, for all feared that the Queen would be torn to
pieces on her way to the scaffold.
One proffered his help.
“Thank you,” said the Queen; “I have no need of your services,
though I am a great sinner. But I am about to receive a great
sacrament.”
“Martyrdom,” said the priest, in a low voice; and he bowed and
retired.
She prayed alone.
However, she had been secretly informed that at a certain house
on her way to execution a minister would be stationed, who would
give her absolution as she passed in the cart.
She dressed herself in the white gown, put a white cap on, bound
with a black ribbon—and so came before the people.
Then she drew back—her queendom still remained. She had not
thought the people so fallen that she should be taken to the scaffold
in the common cart. The King had been taken to death at least in
such a vehicle as he had been accustomed to.
Alas! When Louis died all pity had expired; with her death, all
France was to gasp with thirst for blood.
She mounted the cart—her hands having been bound behind her,
and in the midst of a raging crowd. The cart swayed, and she could
scarcely keep her seat on the plank.
She grew red and pale by turns, as she was dragged through the
mob. The patience and pity exhibited by the King she could not
imitate. Her lips were bitter each moment; but she never took her
dry, hot eyes from the raging people.
Suddenly, her head falls humbly, and, her hands being tied, she
makes the sign of the cross by three motions of the head.
Her pride had passed with that unseen blessing from the house on
her way to execution. When the Palace of the Tuileries came in view
—the place where she had spent nearly half her life—tears fell down
her face.
A few turns of the wheels, and she was at the foot of the scaffold.
Reaching the place, accidentally she trod upon one of the
executioners’ feet.
“Pardon me,” she said, in a sweet, courtly voice.
She knelt for an instant, rose, stretched her neck towards the
distant towers of the Temple, and cried, “Good-bye, my children! I
am going to your father.”
She did not, like her husband, speed to Heaven. It was rather that
she fled from earth.
The executioner was trembling more than his victim, so that she
suffered a long agony of a few moments after she was upon the
plank.
The assistant executioner took his brother’s place.
The head fell. It was taken up and carried around the scaffold.
“Long live the Republic!” saluted this brave display.
The Revolution thought itself avenged—it was befouled.
She came a foreigner—and they killed her.
Thus she died. Frivolous in prosperity, she died with intrepidity.
Her misfortune was her mistrust of the people in her early days—her
catastrophe, that all the sin and wickedness of the Court was laid to
her account.
Called upon to fill a throne, those who called her gave her not
even a tomb—for you may read in a parish register, “For the coffin of
the Widow Capet, six shillings!”
With her life, France threw away all Christian mercy. Crimson
swept over the breadth and length of the land.
CHAPTER LX.
THE T W E N TY-T W O .

The twenty-two had literally been under the control of the police,
though not arrested, since May 31st. But as events progressed, their
destruction became almost necessary to the safety of those
members of the Convention, who, obtaining power wholly through
the will of the more violent, could only retain it by a perfect
recognition of the will of those who had given them the victory.
The twenty-two were therefore seized, and placed in a building
converted from a convent into a prison, and here they made full
preparations to die.
To this day, the walls of this place may be seen covered with
mementoes of the prison-days of the victims of the Revolution. They
are chiefly short verses, written in blood, the purple hues of which
many of the inscriptions still retain.
A few days after the Queen’s day of peace arrived, their trial
commenced.
Of what were they accused?
Really, nothing; but they were in the way, and a threatening
division of the masses insisted upon their death.
After four days’ mockery of justice, the twenty-two were declared
guilty of having conspired against the unity and indivisibility of the
republic, and the whole were condemned to die.
A cry of horror burst from the condemned, for many of them could
not believe that innocent men could be sent to the scaffold.
Valasé, one of the youngest, slipped from his seat to the floor.
“What, Valasé! art losing courage now?” cried his friend Brissot,
upholding him.
“No; I am dying!” returned Valasé; and his fingers quivered about
the handle of the poniard with which he had taken his own life.
Silent horror for a moment prevailed; the Girondists blushed and
bowed their heads before their dead companion, who had given
them an example of fearlessness in meeting death.
Only one, named Boileau, showed cowardice. He cast his hat into
the air and screamed, “I don’t belong to these men! I am a Jacobin!”
But instead of pity he only gained contempt.
And now a cry was heard; it came from Camille Desmoulins: “Let
me fly,” he cried; “it is my book which has killed them!”
But the crowd seized Desmoulins, and forced him to remain.
The twenty-two came down from the high seats upon which they
had heard their trial and sentence, and for a moment stood round
the dead body of their friend, who had shown them how to die.
Almost simultaneously they raised their hands and cried, “Innocent!
Long live the republic!”
Then they cast all the money they had with them amongst the
crowding, storming people, who greedily seized it. This was done,
not to excite the mob to revolt, but with the thought that, their
death at hand, they had no farther need of wealth.
There was something strangely classic and Roman-like in their
death. They left the hall singing loudly the celebrated hymn, the
“Marseillaise;” and in reference to their death, they sang with
amazing power the celebrated two lines,
“March on, march on! O children of the land,
The day, the hour of glory, is at hand!”

This terrible hymn they were still singing as they entered their
prison. It was now late in the evening, and they were to suffer on
the following morning.
The tribunal had decreed that the yet warm corpse of Valasé
should be carried back to prison, conveyed in the same cart with his
accomplices to the scaffold, and interred with their bodies. The only
sentence, perhaps, which punished the dead.
Four men-at-arms carried the body upon a litter, and thus the
procession reached the prison.
The twenty-two were to pass the night in the same room, the
corpse in one corner. The twenty-one—even Boileau, who repented
of his momentary cowardice—came, one by one, and kissed the
dead man’s hand, then covered his face, saying, “To-morrow,
brother!”
One Bailleul, a Girondist and a Conventionist, but who had
escaped the proscription, yet had not left Paris, had promised that,
after the trial, he would prepare and send to the prison, either a
triumphant or a funereal supper, according to the sentence.
The promise was kept. Upon the oaken table, stretching the
length of their dungeon was set out a supper, royal in its
magnificence. Every luxury to be obtained, every delicate wine with
a name, filled those portions of the table not covered by a wealth of
flowers and great clusters of brilliantly burning wax candles.
To one Abbé Lambert, who lived fifty years after that night, we
owe all we have learnt concerning that final meal. This minister was
waiting to offer consolation to the condemned as they passed to the
scaffold.
The supper lasted from midnight until the dawn of day—at the
end of October, about half-past five. It was the feast of their
marriage with death. No sign was given of their approaching end. All
ate with sobriety, but with appetite; and it was only when the fruit
and wine alone remained on the table that the conversation became
excited and powerful.
Many, especially the younger men, who did not leave families
behind them, were very gay and witty. They had done no great
wrong, and were sacrificed to duty, therefore they met death with
cheerful faces.
With solemn break of day, the conversation became graver.
Brissot cried, “now that we, the honest men amongst those who
govern, are about to die, what will become of the republic? How
much blood will it require to wash away the memory of ours?”
“Friends,” cried Vergniaud, “we have killed the tree by over-
pruning it. It was aged—Robespierre cuts it down. Will he be more
fortunate than ourselves? No; the land of France is now too weak for
honest growth. The people play with laws as children with toys; they
are too weak to govern themselves; and they will return to their
kings as children to their toys, after they are tired of having thrown
them away. We thought ourselves at Rome; we were in Paris. But, in
dying, let us leave to the whole of France—the strength of hope.
Some day—some great day—she will be able to govern herself.”
At ten o’clock the executioners arrived to prepare the victims for
the scaffold. Gensomé, picking up a lock of the black, brilliant hair
cut from his head, gave it to Abbé Lambert, and begged him to carry
it to his wife. “Tell her,” he said, “it is all I can send, and that I die
thinking of her.”
Vergniaud drew his watch from his pocket, scratched his initials
and the date in it with a pin, and sent it by the hands of one of the
executioners’ assistants to a young girl whom he loved deeply, and
whom it is said he intended to marry.
Every one sent a something to some one or more in memory of
himself, and it is pleasant to be able to state that every message and
remembrance were faithfully delivered.
When the last lock of hair had fallen, the victims were marshalled,
and they were led out to the carts waiting to receive them.
They sang the “Marseillaise” to the scaffold—they sang it when
they reached it, the song growing fainter and fainter as each head
fell; and the hymn only ceased, as the last head fell—that of their
leader, Vergniaud.
The dead body of their friend was carried with them.
Such was the end of the founders of the French republic.
With them the brightness, beauty, youth, wit, frankness of the
Convention passed away, and their places were filled by sullen,
threatening men.
CHAPTER LXI.
THE RED FLAG.

The first to fall was the Duc of Orleans (father of Louis Philippe,
King of the French). He had done nothing against the interests of
the republic, but his birth was a crime, and his death was decided
on.
The Prince and his sons were at table when the fatal indictment
arrived.
“So much the better,” said he. “This must end one way or the
other. Kiss me, children. And I wonder of what they accuse me?” he
said, opening the paper. “The scoundrels!” he added; “they accuse
me of nothing. Come, boys, eat; for this summons is indeed good
news.”
He was taken to Paris, where, at this time, no man of mark, being
put upon his trial, escaped the guillotine.
The one plausible accusation brought against Orleans must have
compressed his heart.
“Did you not vote the King’s death in the hope of succeeding to his
throne?”
“No; I obeyed my heart and my conscience.”
He heard his sentence calmly, despite the fact of his cowardice in
his early years; and he replied sarcastically to his judges, “Since you
were determined to condemn me, you should have found better
pretexts than you have; for, as it is, you will deceive no man into
believing that you think me guilty. I am in the way. And you too,” he
said, turning to a once Marquis d’Autonelle, an old friend,—“you to
condemn me! Finally,” he continued, “since I am to die, I demand
not to be left in gaol a whole night, but to be at once taken to the
block.”
This desire was not complied with. Returning to the gaol, his rage
was terrible.
The Abbé Lambert approached and said, “Citizen Equality, will you
accept my assistance, or, at least, the offer of my condolence?”
“Who are you?”
“The Vicar-General of the Bishop of Paris. If you will not accept my
religious help, can I be of any service to you after your death? Have
you messages to send?”
“No; I can die without help, and like a good citizen.”
He went to the place of execution at three, accompanied by three
others.
Reaching the scaffold, he looked at the knife calmly; and the
executioner offering to remove his boots, he said, “You will do it
more easily afterwards.”
He was dressed very beautifully for his death, and he died without
fear. He had followed the Revolution blindly—had thrown away
fortune, name, reputation, in its cause, and it destroyed him simply
because he had belonged to royalty.
Terror was rapidly reddening all the land.
The guillotine was not quick enough, and squads of soldiers shot
down the condemned.
Such sentences as the following, were accepted as truths:—
“The time is come when the prophecy shall be fulfilled. The
wealthy shall be despoiled, and the poor shall be enriched.
“If the people want bread, let them profit by the sight of their
misery, to seize on the possessions of the wealthy.
“Do you seek a word which furnishes all you need?—die, or cause
others to die.”
The great Terror began at Lyons.
“The great day of vengeance has arrived,” cried one Cholier. “Five
hundred men amongst us deserve to share the fate of the tyrant. I
will give you the list—be it your part to strike!”
He then seized a crucifix, dashed it upon the ground, and
trampled upon it.
Here is another theory which was applauded:—
“Any man can be an executioner—it is the guillotine which really
takes life.”
This Cholier, who had trampled upon the crucifix, clung to it when
condemned to the death he was always seeking for others. The knife
was blunt, and five times it was raised before the head fell. “Quick—
quick!” the wretch cried, when it was raised for the fifth time.
Some time after, when the Terror was rising to its height, Cholier
was looked upon as a martyr; his body was burnt, and the ashes
placed in an urn, were carried triumphantly through the streets, and
placed upon an altar of patriotism raised to him.
The altar in question was soon thrown down.
But only after the Terror ended.
With Cholier’s after-death triumph, the “moderates” began to fall.
Ten of the municipals of Lyons (the place of Cholier’s exploits) were
beheaded in one day, and a mine was exploded which destroyed the
finest parts of the city.
Lyons was almost annihilated. At a cost of half a million of money
(English), houses worth twelve millions were destroyed. Why?
France was mad. So hurriedly was this destruction effected, that
hundreds of the workmen themselves were buried in the ruins.
Life, however, was cheap.
Rags only were to be seen—a decent dress was equivalent to
condemnation. The city was dead but for the thunder of fallen
houses, the roar of cannon and the rattle of musketry mowing down
suspected people, and the shrill cry of the ragged as they marked
another head fall beneath the guillotine knife. It was now looked
upon as a distinction, and reserved only for important people.
An entire generation was destroyed in Lyons alone. Great houses
were unowned—for their owners were dead. Castles, churches,
factories, work-shops, were closed, for their heads had all passed
under the guillotine.
Starvation increased, for the land lay a-dying.
The guillotine was getting old and worn-out at Lyons.
One morning, sixty-four are marched out to death. They are
bound, and ranged in a line before an open trench. Three pieces of
cannon, loaded with bullets, sweep the ranks. Not half are touched.
“Forward!” is the word given to the dragoons, who hack and shoot
down the victims. This lasts two whole hours.
Nine hundred and thirty executioners, in the shape of an entire
regiment, were to send their victims, marshalled in a row, into
eternity at the same moment. At the order “Fire!” four bullets struck
at the life of the victims, all of whom are tied to a rope stretched
from tree to tree.
Strange—when the smoke arose, only half were found dead. The
rest remained either wounded or untouched. The unscathed stared
in horror; the wounded screamed to be despatched.
The soldiers could not fire again. Some of the prisoners had freed
themselves, and were escaping. The dragoons were ordered forward
to cut them down. The victims were killed piece-meal. One man, a
mayor of his town, reached the river, but there his bleeding hand
betrayed him, and he was cast into the river.
The soldiers protested against the use to which they were put.
The massacres lasted until night-fall. Yet when the grave-diggers
came next morning, some hearts still beat. The sextons put the
martyrs out of their misery at once by blows on the head with their
pickaxes.
“We are purging the land,” wrote Collet d’Herbois to the
Convention.
Every day twenty-two were regularly shot. By this time, the fear of
life rendered death sweet. Girls, men, children, prayed that they
might be shot with their parents. Sometimes they permitted this,
and little boys and girls were shot, holding their father’s hands.
Women who were seen to shed tears at executions, were shot.
Mourning was prohibited under pain of death.
One lad of fourteen, says, “Quick—quick! You have killed papa! I
want to overtake him!”
One De Rochefort[2] was accompanied by a son to the butchering-
ground, whither he went with three relatives. The men fell—the boy,
aged fifteen, remained standing.
The executioner hesitated—the people murmured.
“God save the King!” cried De Rochefort.
A moment—a report—he fell, shattered to death.
A lovely girl, fourteen, is brought before the judge for refusing to
wear the national cockade.
“Why do you refuse to wear it?” asks the judge.
“Because you do!” replies the child.
Her beauty, rather than justice, pleading for her, a sign was made
that a wreath should be put in her hair, the emblem of liberation.
She cast it upon the ground. She died.
A man came to the Hall of Justice.
“You have slain my father, my brothers, my wife—kill me. My
religion forbids me to destroy myself. In mercy, kill me.”
In mercy—they killed him.
A woman, who had fought bravely in the earlier and fairer time of
the Revolution, was carried to the scaffold, though about to become
a mother. She did not fear death—she pleaded for the other life.
She was laughed at—hooted—and so died.
A girl of seventeen, and much resembling Charlotte Corday, was
accused of having served as an artillerist in the trenches of the
forces opposed to the national forces.
“What is your name?”
“Mary; the name of the mother of the God for whom I am about
to die.”
“Your age?”
“Seventeen; the age of Charlotte Corday.”
“How!—at seventeen, fight against your country?”
“I fought to save it.”
“Citizen—we, your judges, admire your courage. What would you
do with your life if we gave it you?”
“Use it to kill you!”
She ascended the scaffold, alarmed at the crowd of people—
fearless of death. She refused the executioner’s help—cried twice,
“God save the King!”—and lay down to die.
After her death, the executioner found amongst her clothes a note
written in blood. It was from her lover, who had been shot some
days before.
The lovers were only separated by a few days. Their history
touched the people, but the people of that day did not know how to
pardon.
These awful executions were at last arrested, not because the
victims were exhausted, but because the soldiers threw down their

You might also like