Download ebooks file Python 3 Web Development Beginner s Guide Anders all chapters
Download ebooks file Python 3 Web Development Beginner s Guide Anders all chapters
com
https://ebookname.com/product/python-3-web-development-
beginner-s-guide-anders/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/python-testing-beginner-s-guide-1st-
edition-daniel-arbuckle/
ebookname.com
https://ebookname.com/product/phonegap-3-beginner-s-guide-2nd-edition-
giorgio-natili/
ebookname.com
https://ebookname.com/product/fastapi-modern-python-web-
development-1st-edition-bill-lubanovic/
ebookname.com
https://ebookname.com/product/encyclopedia-of-american-industries-
manufacturing-industries-4th-edition-lynn-m-pearce/
ebookname.com
Essential concepts for healthy living 7th Edition Edition
Alters
https://ebookname.com/product/essential-concepts-for-healthy-
living-7th-edition-edition-alters/
ebookname.com
https://ebookname.com/product/comparative-government-and-politics-6th-
edition-comparative-government-polit-rod-hague/
ebookname.com
https://ebookname.com/product/sleight-of-mouth-volume-ii-how-words-
can-change-worlds-1st-edition-robert-brian-dilts/
ebookname.com
https://ebookname.com/product/badd-boy-the-badd-brothers-book-8-1st-
edition-jasinda-wilder/
ebookname.com
https://ebookname.com/product/public-relations-for-dummies-2nd-ed-
edition-eric-yaverbaum/
ebookname.com
Static Government Liars Media Cheerleaders and the People
Who Fight Back First Edition Goodman
https://ebookname.com/product/static-government-liars-media-
cheerleaders-and-the-people-who-fight-back-first-edition-goodman/
ebookname.com
Python 3 Web Development
Beginner's Guide
Michel Anders
BIRMINGHAM - MUMBAI
Python 3 Web Development
Beginner's Guide
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals. However,
Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-849513-74-6
www.packtpub.com
Copy Editor
Leonard D'Silva
About the Author
Michel Anders, after his chemistry and physics studies where he spent more time on
computer simulations than on real world experiments, the author found his real interests
lay with IT and Internet technology, and worked as an IT manager for several different
companies, including an Internet provider, a hospital, and a software development company.
After his initial exposure to Python as the built-in scripting language of Blender, the popular
3D modeling and rendering suite, the language became his tool of choice for many projects.
He lives happily in a small converted farm, with his partner, three cats, and twelve goats.
This tranquil environment proved to be ideally suited to writing his first book, Blender 2.49
Scripting (Packt Publishing, 978-1-849510-40-0).
He loves to help people with Blender and Python-related questions and may be contacted as
'varkenvarken' at http://www.blenderartists.org/ and maintains a blog on Python-
specific subjects at http://michelanders.blogspot.com/.
Michael Driscoll has been programming Python since the Spring of 2006 and has
dabbled in other languages since the late nineties. He graduated from the University with
a Bachelors of Science degree, majoring in Management Information Systems. Michael
enjoys programming for fun and profit. His hobbies include Biblical apologetics, blogging
about Python at http://www.blog.pythonlibrary.org/, and learning photography.
Michael currently works for the local government, where he does programming with Python
as much as possible. Michael was also a Technical Reviewer for Python 3: Object Oriented
Programming by Dusty Phillips and Python Graphics Cookbook by Mike Ohlson de Fine (both
by Packt Publishing).
I would like to thank my friends and family for their support and the fun
times they share with me. Most of all, I want to thank Jesus for saving me
from myself.
Róman Joost discovered open source software in 1997. He is the project manager for
user documentation for GNU Image Manipulation Program (GIMP). Róman also helped with
German internationalization of GIMP. He has been contributing to GIMP and Zope open
source projects for eight years.
Róman has a Diplom-Informatiker (FH) from the University of Applied Sciences in Koethen
(Anhalt). He has worked for Zope companies—Gocept GmbH & Co in Germany, Infrae in
The Netherlands, and is currently working for a Zope company in Brisbane, Australia. For
relaxation, he enjoys photography and digital painting with GIMP.
Tomi Juhola is a software development professional from Finland. He has a wide range of
development experience from embedded systems to modern distributed enterprise systems
in various roles such as tester, developer, consultant, and trainer.
Currently, he works in a financial company and shares this time between development lead
duties and helping other projects to adopt Scrum and Agile methodologies. He likes to spend
his free time with new interesting development languages and frameworks.
He has reviewed conference proposals, a Python development book, and has also published
his own Master's theses on Agile embedded development.
Nicholson has a B.Eng (Computer) [Honours 1] from Newcastle University, Australia and a
M.Eng (Wireless) with Merit from Sydney University, Australia.
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.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can access, read and search across 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 web browser
[ ii ]
Table of Contents
CSS: tasklist.css 87
Summary 90
Chapter 4: Tasklist II: Databases and AJAX 91
The advantages of a database compared to a filesystem 92
Choosing a database engine 92
Database-driven authentication 93
Time for action – authentication using a database 94
Tasklist II – storing tasks in a database 99
Improving interactivity with AJAX 99
Time for action – getting the time with AJAX 100
Redesigning the Tasklist application 102
Database design 103
Time for action – creating the task database 103
Time for action – retrieving information with select statements 105
TaskDB – interfacing with the database 106
Time for action – connecting to the database 106
Time for action – storing and retrieving information 107
Time for action – updating and deleting information 109
Testing 111
Time for action – testing factorial.py 112
Now what have we gained? 113
Time for action – writing unit tests for tasklistdb.py 114
Designing for AJAX 116
Click handlers 120
The application 121
Time for action – putting it all together 123
Have a go hero – refreshing the itemlist on a regular basis 125
Summary 126
Chapter 5: Entities and Relations 127
Designing a book database 127
The Entity class 128
Time for action – using the Entity class 129
Time for action – creating instances 132
The Relation class 138
Time for action – using the Relation class 138
Relation instances 141
Time for action – defining the Books database 144
The delivery layer 150
Time for action – designing the delivery layer 151
Time for action – adding a new book 162
[ iii ]
Table of Contents
And when this was sung many devils appeared and saluted her as a
queen.
The Signore Primo was indeed amazed and terrified, for now he
realized that the Beghina was worse than he had supposed, or a
witch of the most malignant kind. But he left the place, and going
to the lady, told her all he had witnessed. Then she in great terror
fainted, and when restored to life declared that, if anyone could save
the soul of her son, he should have all her fortune.
Then the Signore Primo told her that if anyone could defeat the evil
witch it was a great magician who by lucky chance was in Arezzo,
and that she should seek him forthwith. This great magician was no
other than Virgil. And as soon as the lady appeared, Virgil said:
“I know why thou art come.”
Then he led her to the form of an angel clad in a rose-coloured garb,
and, kneeling before it, said:
Once in the olden time, in Colle Alto, the snow fell in one night many
yards in depth, and the people were astonished and frightened when
they awoke in the morning at beholding it spreading far and wide.
Many tried to shovel it away, but were discouraged, because, as they
removed it, as much came in its place, so that at last they all
remained at home, for no one could pass through the snow, and
they were afraid of being buried in it.
But the poor, who had but scant provision in their homes, suffered
from hunger. And among these was a good man to whom his five
children pitifully cried:
“Babbo-il pane!”—Papa, give us bread!
And he replied:
“My children weep, and I must risk my life to save them.” And
looking out, he cried unthinkingly:
“And yet the snow is very beautiful!
O Spirit of the Snow—no mortal knows
How beautiful thou art. Be kind to us!”
As he said this there appeared before the window, and then among
them, a lady of marvellous beauty and dazzling brightness, all clad in
white, who said:
“What wilt thou have, since thou hast invoked me?”
“Lady,” replied the astonished peasant, “I know not who thou art,
nor did I call thee!”
“Yes; in thy speech thou didst pronounce my name in invocation,
and to those who do that, and deserve it, I give my aid. Follow me!”
The poor man was surprised and bewildered, but he followed, while
trembling, the lady.
And she spoke in a voice which was heard in every house far and
near in Colle Alto:
“Let him who will come forth without fear, for this good man hath
opened unto you the way. But it is only the poor who can do this,
because, while they have suffered and starved in their homes, not
one of the rich who dwell here have made any effort to relieve the
suffering, therefore none of them shall come forth till the snow is
gone.”
Then all the poor folk found that they could walk upon the snow, [135]
which was a pleasure, but the gentlefolk could not stir a step out of
doors till it melted. And it vexed them sorely to stand at their
windows and see women and children running merrily over the
snow, so that some of them cursed their wealth, and wished that
they were of the poor and free.
For fifteen days not a flake of snow disappeared, and then all at
once it went away, and the poor, on opening their windows in the
morning, found the sun shining, and a warm breeze blowing, which
was scented as with roses, and the streets and roofs all as clean as
if new. Then all the poor gathered every man a stone, and meeting
in one place, they there built a little church (chiesina), and called it
the Chapel of the Goddess of the Snow, and adored her as if she
had been the Madonna or a saint.
Then for some time, as usually happens, there was great enthusiasm
—vie un gran fanatismo—and then again all was gradually
forgotten. So with the Goddess of the Snow: as years went by
people talked about her less and less, and she was even ridiculed by
those who were of evil hearts and souls, such as abuse and ill-treat
their benefactors—as was shown by a certain waggoner, who found
himself one day many miles afar from any house, when snow began
to fall. And with it he began to curse, so as to shock even a sinner;
whereupon it drifted round him so deeply that he with his waggon
could get no further. And so he kept on blaspheming. His poor
starved horses looked at him with meaning, as if calling his
attention, and then cast their glances to the wall or a shrine,
whereon was depicted an image of the Goddess of the Snow, as if
begging him to notice or to appeal to it. And the wretch beholding
it, swore worse than ever, saying that she was an accursed (witch).
He had not time to pronounce the word ere he sank down (into the
snow), so that only his head remained uncovered. And his horses
also were in the same place, but a warm wind began to blow. And
so the man remained fast, freezing and starving, for three days, but
it did not make him repent, and he swore more than ever.
Then, on the third day, Virgil, the great magician, passed by, and
was amazed at seeing the horses quietly feeding on grass in the
warm sunshine, while a pleasant breeze was blowing, and close by
them a man buried to his neck in the snow. And being questioned,
the waggoner replied that he was thus buried for blaspheming the
Goddess of the Snow.
Virgil asked him if he repented it.
“I will repent,” replied the waggoner, “when I see it proved by a
miracle—but in miracles I put no faith.”
“Well,” said Virgil, “pray to the goddess to pardon you. Pray with me
thus:
Then the waggoner took his horses and rode home at double-quick
speed. He related to all what had happened, and the chapel was
again restored with the image of the goddess. But even among the
experienced (conoscenti) none could tell him [for a long time] who
was the one who had taught him what to do. But it was at last
made known to them that it was the great magician and the great
poet Virgil, because the Goddess of the Snow and Virgil are good
spirits. [138]
So this waggoner, from being evil became so good that one could
not find his equal.
Our Lady of the Snow, or Maria vom Schnee, is one of the more
familiar avatars of the Madonna all over Middle and Northern Italy
and Germany, including Austria and Switzerland. One of the
commonest halfpenny or soldo pamphlets sold at corners in Florence
is devoted to her. A very famous Madonna of the Snow is that of
Laveno, to whom there is a special festival. Wordsworth has
devoted a poem to her.
In the legend which I have given the general resemblance of the
whole to the Madonna tales, as in the building a chapel, the threat
of hell, and the punishment for profanity, suggest that it is borrowed
from a Catholic source. This I doubt, for several reasons. It is of
the witch witchy, and heathen, as shown by calling the lady a
goddess, and especially by the long scongiurazione or evocations in
which the sorcerer takes such delight that for him they form the
solid portion of the whole, possibly because they are, if not actually
prohibited, at least secret things, cryptic or of esoteric lore. Now, be
it noted that wherever, as regards other legends, as in that of the
Madonna del Fuoco, given in my “Etrusco-Roman Legends,” the
witch claims that her tradition has been borrowed by the priests, she
is probably in the right. But what gives colour to the opinion that
this Madonna is of heathen origin is the fact that in the Old German
mythology, as Friedrich declares, there is a deity known as Lady
Holde, Holle, or Hilda (who may be again found in the Christian
Maria), who is a kind and friendly being. She was the Goddess of
the Snow, hence it is commonly said when it snows that Lady Holde
is making her bed and shaking out the feathers. As there is no
German supernatural character, especially in the fairy mythology,
which does not exist in Northern Italy, it would be very remarkable
indeed if such a widely known and popular spirit as the Lady of the
Snow had not been known there long before the Christian
Madonna. I would add that this is purely and literally a legend of
the people, not asked for by me, and not the result of any inquiry or
suggestion.
The Madonna della Neve is especially honoured at Laveno, where
there is an annual procession in her honour. I am indebted to the
kindness of the Rev. Arthur Mangles, who knew that I was interested
in the subject, for the following, translated by him from some small
local book there published:
THE LEGEND OF LA MADONNA
DELLA NEVE.
The following tale was obtained by Miss Roma Lister from the vicinity
of Rome, and from an old woman who is learned in sorcery and
incantations. It begins with the note that, on February 8, 1897, it
was taken down as given, literally word for word, and I translate it
accordingly verbatim.
There were a husband, a wizard, and his wife (who was a witch),
who had a beautiful daughter, and a house with a fine garden which
was full of broccoli—oh, the finest broccoli in the world!
And opposite to this, or overlooking the garden, dwelt two women,
and one of these was incinta, or with child, and she said to the other
woman:
“Comare, [140] how I would like to have two broccoli from the
magician’s garden. They’re so nice!”
“Yes, comare, but how to get them? It would be dangerous!”
“La cosa si farà—it can be done, at midnight when the sorcerer is
asleep, by stealing a little.”
And so they did, for at midnight both went with a sack, climbed over
the iron gate, and, having filled their bag, went away. [141a]
In the morning the magician Virgilio went to his garden and found
that many broccoli were gone. In a rage he ran to his wife, and
said: “What’s to be done?”
She replied: “This night we’ll set the cat on guard upon the gate.”
Which was done. That evening, fra il lusco e il brusco, [141b]
the one
said:
“Ah, gossip, this night it can’t be done.”
“And why not, my dear?”
“Why! Because they’ve set a guard.”
“Guard! An old cat, you mean. Are you afraid of her?”
“Yes, because she mews when she sees something.”
“I say, I’ll tell you what to do. Take a bit of meat, and when she
opens her mouth to mew, pitch it in. That’ll keep her jaws quiet
while we pick the broccoli.”
And so it was done, and they got away with another bagful of
broccoli.
In the morning the mago Virgil found that he had been robbed
again. He complained again to his wife, who said:
“Well, to-night we will put the dog on.”
Said and done. But the dame at the window was on the watch. And
seeing all, she said:
“No broccoli to-night, gossip. This time they’ve put the dog to look
out.”
“Oh, bother the dog! When he opens his jaws to bark, I’ll pitch in a
good bit of hard cheese. That’ll keep him quiet.”
Said and done again. The next morning the magician found a still
greater disappearance of broccoli from his garden.
“The thing is becoming serious,” he said. “To-night I will watch
myself.”
With that he went to his gate and remained there, looking closely at
all those who passed by. So he said to the first:
“What is your trade?”
“I’m a carpenter.”
“Pass on,” replied the magician. “You’re not the man I want.”
There came another.
“What’s your calling?”
“I’m a tailor.”
“Pass on—non fate per me” (you won’t do).
There came a baker. He was not wanted. But the next was a digger
of ditches and of graves—a fossaruolo—and the wizard cried:
“Bravo! You’re my man! Come with me; I want you to dig a pit in
my garden.”
So the poor man went, for he was as much frightened at the terrible
face and stature of the wizard as he was in hope of being paid. And
being directed, he dug a hole nearly as deep as the magician was
tall.
“Now,” said the master, “get some light sticks and cover over the pit
while I stand in it, and then strew some twigs and leaves over it,
with a few leaves to hide the top of my head.”
It was done, and there he stood covered. The ditcher, or sexton,
hurried away, glad that he had dug this strange grave for another,
and not for himself.
Evening came, and the gossip looked out.
“Good! There is not even a dog on guard. Come, let us hurry! This
time we will take all that remains of the broccoli.”
Said and done. And when they had gathered the last plant, the
gossip cried:
“See what beautiful mushrooms! Let us pick them.”
She had seen the two ears of the sorcerer, which peeped out
uncovered. So she took hold of one and pulled.
“It will not come out!” she cried. “Do thou pull at one, while I draw
at this.”
Each pulled, when the magician raised his awful face and glared at
them. E sorte fuori la terribile testa del mago!
“Now you shall die for robbing me!” he exclaimed.
They were in a fine fright. At last Virgil said:
“I will spare thy life, if thou wilt give me all thou bearest—all within
thee.”
She consented, and they departed. After a time she became a
mother, and the magician came and demanded the child. And as
she had promised it, she consented to give it to him, but begged
that it might be left to her for a time.
“I will give it to thee for seven years,” he replied. Saying this, he left
her in peace for a long time. So the child, which was a boy, was
born, and as he grew older was sent every day to school.
One morning the magician met him, and said: “Tell thy mother to
remember her promise.” Then he gave the child some sweets, and
left him. When at home the boy said:
“Mamma, a gentleman met me to-day at the door of the school, and
said to me that I should tell you to remember your promise. Then
he gave me some comfits.”
The poor mother was in a great fright.
“Tell him, when you next meet him,” she answered, “that you forgot
to give his message to me.”
The next day the boy met the magician, and said to him that he had
forgotten all about it, and told his mother nothing.
“Very well, tell her this evening, and be sure to remember.”
The mother heard this, and bade him tell the sorcerer the same
thing again.
When he met the magician Virgil again and told the same story, the
latter smiled, and said:
“It seems that thou hast a bad memory. This time I will give thee
something by which to remember me. Give me thy hand.”
The boy gave his hand; the magician bit into one finger, and as the
child screamed, he said: “This time thou wilt remember.” The boy
ran yelling home.
“See what has happened to me, brutta mammacia—you naughty
mamma—because I did what you bade, and told the gentleman that
I forgot.”
The poor woman, hearing herself called brutta mammacia, [143] was
overcome with grief and shame, and said, “Vai bene—I will tell him
myself.” So the next day she took the child and gave him to the
magician, who led him to his home.
But when his wife, the witch, beheld the boy, she cried:
“Kill that child at once, for I read it in his face that he will be the ruin
of our daughter Marietta!”
But the magician declared that nothing would induce him to harm
the boy, so the little fellow remained, and was treated by the master
like a son. In due time he became a tall and handsome young man,
and he was called Antonuccio. But the witch always said:
“We should kill and eat him, for he will be the ruin of our Marietta.”
At last the magician, weary of her complaints, said:
“Bene! I will set him a task, and if he cannot accomplish it, that
same night shall he be slain.”
Now, Antonuccio, as he slept in the next room, had overheard all
this.
The next morning the magician took the youth to a stable which was
very large and horribly filthy, such as no one had ever seen, and
said:
“Now, Antonuccio, you must clean this stable out and out—bene e
bene—repave it on the ground, and whitewash all above it; and
moreover, when I speak, an echo shall answer me.” [144]
The poor youth went to work, but soon found that he could do next
to nothing. So he sat down in despair.
At noon came Marietta, to bring him his lunch, and found him in
tears.
“What’s the matter, Antonuccio?”
“If you knew that I am to be killed this evening—”
“What for?”
“Your father has said that unless I clean out the stable, and pave
and whitewash it to the echo—”
“Is that all? Sta allegro—be of good cheer—I’ll attend to that.”
Marietta went home, and stealing in on tip-toe while the sorcerer
slept, softly carried away his magic wand, and with a few words
cleaned out the stable to the echo, and Antonuccio was delighted.
In the evening the magician came, and finding the stable clean as a
new pin, was much pleased, and kissed him and took him home.
The witch-wife was furious at learning that the stable had been
cleaned, and declared that Marietta had done it, and ended by
screaming for his life. At last the wizard said:
“To-morrow I will set him another task, and should he fail in that, he
shall surely die.”
The next morning he led the youth into a dense forest of mighty
trees, and said:
“Thou seest this wood? In one day it must be all cut down and
cleared away to a clean field, in which must be growing all kinds of
plants which are to be found in the world.”
And Antonuccio began to hew with an axe, and worked well, but
soon gave up the task in despair.
At noon came Marietta with her basket.
“What, crying again! What is the trouble to-day?”
“Only to clear away all this forest, make a clean field, and plant it
with all the herbs in the world.”
“Oh, well, eat your lunch, and I will see about it. It is lucky that it is
not something difficult!”
She ran home, got a magic wand, and went to work. Down the
trees came crashing—away they flew! ’Twas a fine sight, upon my
word! And then up sprouted all kinds of herbs and flowers, till there
was the finest garden in the world.
In the evening came the magician, and was well pleased at finding
how well Antonuccio had done the work. But when his wife heard
all, she raged more than ever, declaring that it had all been done by
Marietta, who was destined to be ruined by the boy.
“Well, well!” exclaimed the wizard. “If you will give me no peace, I
must put an end to this trouble. I will give the boy nothing to do to-
morrow—he may remain idle—and in the evening I will chop off his
head with this axe.”
Antonuccio heard this speech as he had done the others, and this
time was in despair. In the morning Marietta found him weeping.
“What is the matter, Antonuccio?”
“I am to do no work to-day, but this evening I am to have my head
chopped off.”
“Is that all? Be of good cheer—sta allegro—I will see what can be
done.”
She put the pot on the fire to boil, and began to make the
macaroni. When she had cooked a great deal, they fed all the
furniture, pots and pans, chairs and tables, to please them, and
induce them to be silent—all except the hearth-brush, whom by
oversight they forgot.
“And now,” said Marietta, “we must be off and away; it is time for us
to go!”
So away they ran. After a while the wizard and his wife returned
and knocked at the door. No answer. They rapped and called, but
got no reply. At last the hearth-brush cried:
“Who’s there?”
“Marietta, open the door—it is I.”
“I’m not Marietta. She has run away with Antonuccio. First they fed
everybody with ever so much macaroni, but gave me none.”
Then the witch cried to the wizard:
“Hurry—hasten—catch them if you can!”
The good man did as he was bid, and began to travel—travel far and
fast.
All at once, while the lovers were on their way, Antonuccio turned
his head and saw afar their pursuer on a mountain-road, and cried:
“Marietta, I see your father coming.”
“Then, my dear, I will become a fair church and thou shalt be the
fine sexton (sacristano). And he will ask thee if thou hast seen a girl
and youth pass, and thou shalt reply that he must first repeat the
Paternoster and not the Ave Maria. And if he asks again, tell him to
say the Ave Maria and not the Paternoster. And then, out of
patience, he will depart.”
So it came to pass, and the wizard was deceived. When he had
returned, his wife asked him what he had seen.
“Nothing but a church and a sacristan.”
“Stupid that you are! The church was Marietta—fly, fly and catch
them!”
So he set forth again, and again he was seen from afar by
Antonuccio.
“Marietta, I see your father coming.”
“Good. Now I will become a beautiful garden, and thou the
gardener. And when my father comes and asks if thou hast seen a
couple pass, reply that thou weedest lettuces, not broccoli. And
when he asks again, answer that thou weedest broccoli, not
lettuces.”
So it all came to pass, and the wizard, out of patience, returned
home.
“Well, and what did you see?” inquired his wife.
“Only a garden and a gardener.”
“Ahi—stupido! Those were the two. Start! This time I will go with
you!”
After a while Antonuccio saw the two following, and gaining on them
rapidly.
“Marietta, here come your father and mother. Now we are in a nice
mess.” [147]
“Don’t be afraid. Now I will become a fountain fair and broad, like a
small lake, and thou a pretty pigeon, to whom they will call; but for
mercy’s sake don’t let yourself be taken, for then all will be over with
us.”
The wizard and his wife came to the fountain and saw the dove, and
tried to inveigle and catch it with grain. But it would not be caught,
neither could the witch quench her thirst with the water. So, finding
that both were beyond her power, she cried in a rage:
So, when the parents were gone, the pair set forth again, till they
came to a place not far from where the mother of Antonuccio lived.
“I will go and see my mother,” he said.
“Do not go, for she will kiss thee, and thou wilt forget me,” replied
Marietta.
“But I will take good care that she does not kiss me,” answered
Antonuccio. “Only wait a day.”
He went and saw his mother, and both were in great joy at meeting
again, but he implored her not to kiss him. And being weary, he
went to sleep, and his mother, unheeding his request, kissed him
while he slept. And when he awoke, Marietta was completely
forgotten.
So the curse of the witch came to pass. And he lived with his
mother, and in time fell in love with another girl. Then they
appointed a day for their wedding.
Meanwhile, Marietta lived where she had been left, and made a fairy
friend who knew all that was going on far and near. One day she
told Marietta that Antonuccio was to be married.
Marietta begged her to go and steal some dough (from the house of
the bride). The friend did so, and Marietta made of the dough two
cakes in the form of puppets, or children, and one she called
Antonuccio and the other Marietta.
Then, on the day of the feast, the first day of the wedding, she
begged her friend to go and put the two puppets on the bridal table.
She did so, and when all were assembled, the puppet Marietta
began to speak:
He replied:
He replied:
He answered:
“Virgilius made an iron head which could not only speak, but
also foretell the future; and, as some say, it was by
misinterpreting the oracle that Virgilius met his death in this
wise. Being about to undertake a journey, he asked the head if
it would come to a good end. The reply was: ‘Yes, if he took
care of his head.’ Taking this to mean the oracle itself, Virgilius
took every measure to secure it, and with light heart went his
way, but while journeying, exposed to sunshine, he was seized
with a fever in the head, of which he died.”
There once lived a Princess who was beautiful beyond words, but
wicked beyond belief; her whole soul was given to murder and
licentiousness; yet she was so crafty as to escape all suspicion, and
this pleased her best of all, for deceit was to her as dear as life
itself. And this she managed, as many another did in those days, by
inveigling through her agents handsome young men into her palace
by night, where they were invited to a banquet and then to a bed,
and all went gaily till the next morning at breakfast, when the
Princess gave her victim in wine or food a terrible and rapid poison,
after which the corpse was carried away secretly by her servants to
be thrown into the river, or hidden in some secret vault; and thus it
was the lady sinned in secret while she kept up a white name before
the world.
Now it came to pass that a young man, who was a great friend of
Virgil, was taken in the snare by this Princess, and put to death and
no more heard of, when the great poet by his magic art learned the
whole truth. Then for revenge or punishment he made a man of
iron with golden locks, very beautiful to behold as a man, with
sympathetic, pleasing air, one who conversed fluently and in a