0% found this document useful (0 votes)
11 views

Introduction To Computer Programming With Python Harris Wang pdf download

The document is a comprehensive guide titled 'Introduction to Computer Programming with Python' by Harris Wang, covering fundamental concepts of computing, programming languages, and specifically Python. It includes installation instructions, programming environments, and detailed chapters on various programming constructs, error handling, data structures, and object-oriented programming. The book is licensed under a Creative Commons license, allowing for non-commercial use and redistribution with proper credit.

Uploaded by

muehurayvon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Introduction To Computer Programming With Python Harris Wang pdf download

The document is a comprehensive guide titled 'Introduction to Computer Programming with Python' by Harris Wang, covering fundamental concepts of computing, programming languages, and specifically Python. It includes installation instructions, programming environments, and detailed chapters on various programming constructs, error handling, data structures, and object-oriented programming. The book is licensed under a Creative Commons license, allowing for non-commercial use and redistribution with proper credit.

Uploaded by

muehurayvon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Introduction To Computer Programming With Python

Harris Wang download

https://ebookbell.com/product/introduction-to-computer-
programming-with-python-harris-wang-55618812

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Python Programming Learn Python In A Week And Master It An Handson


Introduction To Computer Programming And Algorithms A Projectbased
Guide With Practical Exercises Computer Programming Academy Computer
Programming Academy
https://ebookbell.com/product/python-programming-learn-python-in-a-
week-and-master-it-an-handson-introduction-to-computer-programming-
and-algorithms-a-projectbased-guide-with-practical-exercises-computer-
programming-academy-computer-programming-academy-35391376

An Introduction To Programming And Computer Science With Python First


Edition Clayton Cafiero

https://ebookbell.com/product/an-introduction-to-programming-and-
computer-science-with-python-first-edition-clayton-cafiero-52859214

Python Data Science Learn Python In A Week And Master It An Handson


Introduction To Big Data Analysis And Mining A Projectbased Guide With
Practical Exercises 7 Days Crash Course Book 3 Computer Programming
Academy
https://ebookbell.com/product/python-data-science-learn-python-in-a-
week-and-master-it-an-handson-introduction-to-big-data-analysis-and-
mining-a-projectbased-guide-with-practical-exercises-7-days-crash-
course-book-3-computer-programming-academy-49850014

Python Machine Learning Learn Python In A Week And Master It An


Handson Introduction To Artificial Intelligence Coding A Projectbased
Guide With Practical Exercises Book 2 Academy

https://ebookbell.com/product/python-machine-learning-learn-python-in-
a-week-and-master-it-an-handson-introduction-to-artificial-
intelligence-coding-a-projectbased-guide-with-practical-exercises-
book-2-academy-11359930
Introduction To Computer Game Programming With Directx 80 Ian Parberry

https://ebookbell.com/product/introduction-to-computer-game-
programming-with-directx-80-ian-parberry-2214406

Making Music With Java An Introduction To Computer Music Java


Programming And The Jmusic Library Andrew Brown

https://ebookbell.com/product/making-music-with-java-an-introduction-
to-computer-music-java-programming-and-the-jmusic-library-andrew-
brown-42257420

An Introduction To Objectoriented Programming In C With Applications


In Computer Graphics 2nd Edition Graham M Seed Beng

https://ebookbell.com/product/an-introduction-to-objectoriented-
programming-in-c-with-applications-in-computer-graphics-2nd-edition-
graham-m-seed-beng-4198618

Introduction To Computer Programming And Numerical Methods 1st Edition


Xundong Jia

https://ebookbell.com/product/introduction-to-computer-programming-
and-numerical-methods-1st-edition-xundong-jia-22787938

Introduction To Computer Programming And Numerical Methods Jocelyn O


Padallan Author

https://ebookbell.com/product/introduction-to-computer-programming-
and-numerical-methods-jocelyn-o-padallan-author-33406382
Introduction
to

Computer Programming
with

Python
Introduction
to

Computer Programming
with

Python

Harris Wang
Copyright © 2023 Athabasca University
1 University Drive, Athabasca, AB Canada
DOI: https://doi.org/10.15215/remix/9781998944088.01

Published by Remix, an imprint of Athabasca University Press. For more


information, please visit aupress.ca or email
OERpublishing@athabascau.ca.

Cover design by Lisa Mentz


Images that appear in this text are created by the author.

Library and Archives Canada Cataloguing in Publication

Title: Introduction to computer programming with Python / Harris Wang.


Names: Wang, Harris, author.
Identifiers: Canadiana (print) 20230509916 | Canadiana (ebook)
20230509924 | ISBN 9781998944071 (softcover) | ISBN 9781998944088
(PDF) | ISBN 9781998944095 (EPUB)
Subjects: LCSH: Python (Computer program language)—Textbooks. |
LCGFT: Textbooks.
Classification: LCC QA76.73.P98 W36 2023 | DDC 005.13/3—dc23

Introduction to Computer Programming with Python by Harris Wang is


licensed under a Creative Commons Attribution-NonCommercial-
ShareAlike 4.0 International License, except where otherwise noted. This
license allows users to copy and redistribute the material in any medium
or format and to remix, transform, and build upon the material as long as
the original source is properly credited, the work is not used for
commercial purposes, and the new creation is licensed under the same
terms.

Remix name, Remix logo, and Remix book covers are not subject to the
Creative Commons license and may not be reproduced without the prior
and express written consent of Athabasca University.
Contents

Chapter 1 Introduction
Learning Objectives
1.1 A Brief History of Computers
1.2 Fundamentals of Computing and Modern Computers
Number Systems and the Foundation of Computing
Computability and Computational Complexity
The Construction of Modern Computers
Analog Computers
Digital Computers
Mechanic-Based Components
Vacuum Tube–Based Components
Transistors
Integrated Circuits and Very Large-Scale Integrated Circuits
1.3 Programming and Programming Languages
1.4 Python Programming Language
The Development and Implementation of Python
Advantages of Python
Resources for Python and Python Education
1.5 Getting Ready to Learn Programming in Python
Installing and Setting Up the Python Programming Environment
Installing Python
Setting Up a Virtual Environment for a Python Project
Installing Jupyter Notebook
Installing Visual Studio Code
Additional Tools Supporting Software Development in Python
Buildbot
Trac
Roundup
1.6 Getting a Taste of Programming with Python
Program Interactively with Python Interactive Shell
Program with VS Code IDE
Use Jupyter Notebook Within VS Code to Program Interactively
Write Documentation in Markdown
Headings
Paragraphs
New Lines
Italic, Bold, and Strikethrough Texts
Horizontal Rules
Keyboard Keys
Unordered Lists
Ordered Lists
Definition Lists
Links
Links to Internal Sections
Images
Blockquotes
Tables
Inline Program / Script Code
Code Block
Mathematical Formulas and Expressions
To-Do List
Escape Sequence for Special Characters
Programming Interactively with Jupyter Notebook Within VS Code
Run Python Programs Outside IDE
Make the Python Program File Executable
Errors in Programs
1.7 Essentials of Problem Solving and Software Development
Design Algorithms to Solve Problems
Phases of Software System Development
Phase 1. Understand the Project
Phase 2. Analyze the Requirements to Identify Computer-Solvable
Problems and Tasks
Phase 3. Design the System
Phase 4. Implement the System
Phase 5. Test the System
Phase 6. Maintain the System
1.8 Manage Your Working Files for Software Development Projects
Set Up Git on Your Computer and Version-Control Locally
Set Up an Account on GitHub and Version-Control with Remote Repositories
Chapter Summary
Exercises
Projects
Chapter 2 Essential Building Blocks of Computer
Programs
Learning Objectives
2.1 Primary Constructs of Computer Programs in Python
Vocabulary of the Programming Language
Rules of Naming Identifiers
Python Naming Conventions
Names with Leading and/or Trailing Underscores
Rules of Scope Resolution for Identifiers
Simple Data Types
Signed Integers (int)
Float (float)
Boolean (bool)
Complex (complex)
Compound Data Types
String (str)
List
Tuple
Set
Dictionary
Object
Variables and Constants
Variables
Built-In Constants
Operators
Arithmetic Operators
Comparison Operators
Logical Operators
Bitwise Operators
Assignment Operators
Identity Operators
Sequence Operators
Membership Operator
Built-In Functions
Expressions
2.2 Higher-Level Constructs of Python Programs
Structure of Python Programs
Documentation and Comments
Simple Statements
Expression Statement
Assignment Statement
print Statement
input Statement
assert Statement
pass Statement
del Statement
return Statement
open Statement
yield Statement
raise Statement
break Statement
continue Statement
import Statement
global Statement
nonlocal Statement
help Statement
Compound Statements
Code Blocks
Rules of Indentation
Rules of Spacing
if Statement
if-else Statement
if-elif Statement
if-elif-else Statement
while Statement
for Statement
def Statement
class Statement
try-except Statement
with Statement
Chapter Summary
Exercises
Projects

Chapter 3 Flow Control of Statements


Learning Objectives
3.1 Selective with the if Statement
3.2 Single-branch selective with if Statement
3.3 Multiple-Branch Selective with if-elif-… and if-elif-…-else Statements
3.4 Iterate with for Statement
Using break and continue Statements and an else Clause Within Loops
Common Coding Mistakes with the for Loop
3.5 Iterate with the while Statement
Common Coding Mistakes with a while Loop
3.6 Iterate with for Versus while
Chapter Summary
Exercises
Projects

Chapter 4 Handle Errors and Exceptions in Programs


Learning Objectives
4.1 Errors in Your Programs
Exception
ArithmeticError
OverflowError
ZeroDivisionError
FloatingPointError
AssertionError
AttributeError
BufferError
EOFError
GeneratorExit
ImportError
IndexError
KeyError
KeyboardInterrupt
MemoryError
ModuleNotFoundError
NameError
NotImplementedError
OSError
BlockingIOError
ChildProcessError
ConnectionError
BrokenPipeError
ConnectionAbortedError
ConnectionRefusedError
ConnectionResetError
FileExistsError
FileNotFoundError
IsADirectoryError
NotADirectoryError
PermissionError
ProcessLookupError
TimeoutError
RecursionError
ReferenceError
RuntimeError
StopIteration
StopAsyncIteration
SyntaxError
IndentationError
TabError
SystemError
SystemExit
TypeError
UnboundLocalError
UnicodeError
UnicodeEncodeError
UnicodeDecodeError
UnicodeTranslateError
ValueError
4.2 Handling Runtime Errors and Exceptions
Chapter Summary
Exercises

Chapter 5 Use Sequences, Sets, Dictionaries, and


Text Files
Learning Objectives
5.1 Strings
Methods of Built-In Class str
Built-In Functions and Operators for Strings
Constructing and Formatting Strings
Regular Expressions
5.2 Lists
5.3 Tuples
5.4 Sets
5.5 Dictionaries
5.6 List, Set, and Dictionary Comprehension
List Comprehension
Set Comprehension
Dictionary Comprehension
5.7 Text Files
Opening and Closing a File
Write or Append to a File
Reading from a File
Update Existing Content of a Text File
Deleting Portion of a Text File
Chapter Summary
Exercises
Projects

Chapter 6 Define and Use Functions


Learning Objectives
6.1 Defining and Using Functions in Python
6.2 Parameters and Arguments in Functions
6.3 Recursive Functions
6.4 Anonymous Functions: lambda Expressions
6.5 Special Functions: Mapping, Filtering, and Reducing
Mapping
Filtering
Reducing
6.6 Generators: Turning a Function into a Generator of Iterables
6.7 Closures: Turning a Function into a Closure
6.8 Decorators: Using Function as a Decorator in Python
6.9 Properties of Functions
Chapter Summary
Exercises
Projects

Chapter 7 Object-Oriented Programming with Python


Learning Objectives
7.1 Introduction to Object-Oriented Programming (OOP)
Abstraction
Information Hiding or Data Encapsulation
Inheritance
7.2 Defining and Using Classes in Python
Inheritance: Subclass and Superclass
Public, Private, and Protected Members of a Class
Class Methods
Static Methods
Class Attributes
7.3 Advanced Topics in OOP with Python
Dunder Methods in Class Definition
Using Class as Decorator
Built-In Property() Function and Property Decorator
Creating a New Class Dynamically and Modify a Defined Class or Instance
Keeping Objects in Permanent Storage
Chapter Summary
Exercises
Project

Chapter 8 Modules and Packages


Learning Objectives
8.1 Creating Modules and Packages
8.2 Using Modules and Packages
8.3 Install and Learn About Modules Developed by Others
8.4 Module for Generating Random Numbers
Functions for Bookkeeping
Functions for Generating Random Integers
Functions for Randomly Generating Float Numbers
Functions for Randomly Selected Item(s) from Sequences
8.5 Module for Mathematical Operations
8.6 Modules for Time, Date, and Calendar
The Datetime Module
The Time Module
The Calendar Module
8.7 Modules for Data Representation and Exchange
8.8 Modules for Interfacing Operating Systems and Python Interpreter
OS Module for Interacting with the Operating System
The path Submodule from os for Manipulating File Paths
The sys Module for Interaction Between the Python and Python Interpreter
or Python Virtual Machine (PVM)
8.9 Module for Logging Events During Program Runtime
8.10 Modules for Playing and Manipulating Audio and Video Files
winsound
PyGame
8.11 Modules for Creating and Manipulating Graphics and Images
Create Graphics with Tkinter
Manipulate Images with Pillow
8.12 Modules for Data Analytics
Chapter Summary
Exercises
Projects

Chapter 9 Develop GUI-Based Applications


Learning Objectives
9.1 Terminal-Based Applications Versus GUI-Based Applications
9.2 Designing and Developing GUI-Based Applications in Python
Tkinter Module
tkinter.ttk—Tk-Themed Widgets
Chapter Summary
Exercises
Projects
Chapter 1
Introduction

This chapter prepares you to learn how to program with


Python. Preparation includes a brief introduction to computers
and computing, programming, and programming languages,
as well as the installation of Python and Python interactive
programming and integrated development environments
(IDEs), including Jupyter Notebook for interactive
programming and VS Code as a required IDE.

Learning Objectives
After completing this chapter, you should be able to

• talk about the history of computers.


• describe the basic components of modern computers
and their roles.
• explain the basic principles of modern computers.
• discuss the basics of computability and computational
complexity.
• explain how the construction of modern computers has
evolved.
• explain what computer systems are made of.
• discuss computer programming languages.
• describe Python and discuss its development, features,
and advantages.
• install Python and required Python IDEs on the
computer.
• get Python and Python IDEs running for the learning
activities included in this textbook.

1.1 A Brief History of Computers


The history of human tools, devices, or instruments to help us
count, compute, and think can be traced back to the Stone
Age, when our ancestors used knots on ropes, marks on bark,
stones, and balls of clay. One of the most well-known and
widely used devices for computing in human history is the
abacus, shown in Figure 1-1.

Figure 1-1: A traditional abacus

The exact origin of the abacus is unknown, but before the


adoption of the written Hindu-Arabic numeral system, the
abacus had already been widely used in many countries,
including China, Russia, and some European countries.
Abacuses continued to be widely used by almost all
accountants in China before the adoption of modern
computers and calculators.
Today, although abacuses are rarely used in real applications
such as accounting, their working principles are still used to
train people to do mental math, such as in programs like the
Universal Concept of Mental Arithmetic System (UCMAS; see
ucmas.ca). UCMAS holds annual competitions worldwide,
including in Canada.
The invention and development of today’s modern
computers can be attributed to the invention and
development of all previous relevant concepts, principles, and
technologies. The concept of a digital, programmable
computer originated with Charles Babbage, an English
mathematician, philosopher, inventor, and machine engineer.
In 1822, he designed a steam-driven calculating machine for
automatically computing tables of numbers. Although his
government-funded project failed, the many ideas he
developed and used in his analytical engine were adopted and
used in the world’s first modern programmable computer, built
a century later. That is why Charles Babbage is considered to
be one of the “fathers of computers.”
In 1847, George Boole, an English mathematician introduced
Boolean logic, propositional calculus, and Boolean algebra as
the laws of thinking, which later became the foundation of
modern electronic computers and digital devices in general.
For that reason, George Boole is regarded as a founder of
computer science.
In 1890, Herman Hollerith successfully designed and built a
punch-card-based system for the US government to calculate
its 1890 census. It saved the US government US$5 million by
finishing the calculation in one year instead of 10 years it
would have taken using traditional methods, as in the previous
census. In 1896, Herman Hollerith established a company
called the Tabulating Machine Company to make the
machines. This company ultimately became IBM.
The central concept and theory of modern computers were
conceived in 1936 by English mathematician Alan Turing in his
“universal machine,” which became known as the Turing
machine in his honour. He successfully proved that his
universal machine could calculate anything that is
computable. Alan Turing is also considered by some to be “a
father of computers”—or more precisely, “a father of
computing”—for his seminal paper on the theory of
computation. In the eyes of the general public, Alan Turing is
more famous for his role in cracking the so-called unbreakable
codes used by the German army during World War II, as
presented in The Imitation Game, a well-known Hollywood
movie.
Until 1937, all computing machines or computers were
mechanically based, using gears, cams, belts, or shafts. John
Vincent Atanasoff, an American mathematician and physician
at Iowa State University, attempted in 1937 to build the first
electronic computer. He and Clifford Berry, one of his graduate
students at the time, designed and built a special-purpose
digital computer, ABC. For that reason, he is considered to be
“the father of the modern computer.” It was in the ABC
machine that binary math and Boolean logic were successfully
used for the first time.
In 1943, across the Atlantic Ocean in England, Colossus Mark
I, a prototype of a special-purpose computer, was built. A year
later, in 1944, Colossus Mark II was built and used to break the
encrypted radiotelegraphy messages transmitted by the
German army at the end of World War II.
In 1946, the first general-purpose digital computer, the
Electronic Numerical Integrator and Computer (ENIAC), was
built by two professors at the University of Pennsylvania: John
Mauchly and J. Presper Eckert. The computer had over 18,000
vacuum tubes and weighed 30 tons. A rumour at the time said
that whenever the computer was turned on, the lights in some
districts of Philadelphia would dim.
During the same time, the same group of people at the
University of Pennsylvania also designed and built EDVAC (the
Electronic Discrete Variable Automatic Computer, completed in
1949), BINAC (the Binary Automatic Computer, also completed
in 1949), and UNIVAC I (the Universal Automatic Computer I,
completed in 1950), which were the first commercial
computers made in the US. Although the computing power of
these computers was not even comparable to that of today’s
smartphone, their contributions to the development of today’s
modern computers are enormous. These contributions include
the concepts, principles, and technology of stored programs,
subroutines, and programming languages.
Around the same time that ENIAC was built, the Harvard
Mark I automatic sequence-controlled calculator was also built
at Harvard University. It is believed that John von Neumann, a
mathematician and physicist working at the Los Alamos
National Laboratory, was the first user of the Harvard Mark I,
which he used to run programs on the machine to calculate for
the Manhattan Project.
In 1944, Von Neumann had an opportunity to join a
discussion with J. Presper Eckert and John Mauchly, who were
developing ENIAC and EDVAC machines at the time. He wrote
up a report on the EDVAC, First Draft of a Report, in which he
described a computer architecture later known as
Von Neumann architecture (see Figure 1-2). The key idea
behind the architecture is a stored-program computer that
includes the following components:

• a processing unit that contains an arithmetic logic unit


and processor registers
• a control unit that contains an instruction register and
program counter
• internal memory that stores data and instructions
• external mass storage
• input and output mechanisms

The unpublished report was widely circulated. It had great


impact on the later development of modern computers,
although to many people, Turing was the originator of this key
idea and architecture, and many others, including J. Presper
Eckert and John Mauchly, made significant contributions to its
evolution as well. Regardless, it is Von Neumann architecture
that has guided the design of modern computers. All
computers we use today are essentially still Von Neumann
computers.
Modern computers can be categorized into three
generations based on the core hardware technology used. The
first generation of computers (1937–46) used vacuum tubes,
the second generation (1947–62) used transistors, and the
third generation (1963–present) used integrated circuits (IC).

Figure 1-2: Von Neumann architecture

Both hardware and software play important roles in


computers. On the hardware front, in the first generation of
modern computers, magnetic tapes and disks were developed
and used for storage, and printers appeared and were used for
output. On the software side, simple operating systems (OSs)
were developed and used, and over 100 high-level
programming languages were developed.
During the second generation of computers, the Universal
Automatic Computer (UNIVAC I), the first computer for
commercial use, was introduced to the public (1951). The
International Business Machines Corporation (IBM) also
brought their IBM650 and IBM700 series computers to the
computer world (1953).
Since 1963, the beginning of the third generation of modern
computers, advances in hardware have made computers
smaller and smaller but much more powerful, with a higher
speed of CPU and a bigger memory with faster throughput.
In 1980, Microsoft developed MS-DOS, short for Microsoft
Disk Operating System, and in 1981, IBM introduced the first
personal computer (PC) for home and office use. In 1984,
Apple brought its Macintosh computer with its icon-driven
interface to the world, and in the 1990s, Microsoft brought the
world the Windows operating system. Billions of computer
users around the world have enjoyed both Microsoft Windows
and Apple’s macOS.
More information about the history of computers can be
found on the internet by searching for “history of computers,”
including the following articles:

https://en.wikipedia.org/wiki/Computer
https://www.computerhistory.org/timeline/computers/
https://www.explainthatstuff.com/historyofcomputers.html
https://www.britannica.com/technology/computer/History-of-computing

1.2 Fundamentals of Computing and Modern


Computers
The development of modern computers is the result of the
collective efforts of many great mathematicians, scientists,
and engineers and advances in both theories and
technologies. This section looks at the theoretical and
technical fundamentals of computing and modern computers
in order to show how modern computers work internally.

Number Systems and the Foundation of Computing


Initially, computers and computing devices were developed to
deal with numbers. They later made their way into the realm
of text handling and information processing. This is done
through encoding. When properly coded, all text can be
represented as numbers—codes—and all ways of manipulating
text can be accomplished through operations on those codes.
Number systems and operations on numbers are really a basic
foundation of computing and modern computers.
We all know numbers, and the number system we have
known since childhood is base-10, which is represented using
10 digits from 0 to 9. A base-10 number such as 2539867 can
be written as

2 * 106 + 5 * 105 + 3 * 104 + 9 * 103 + 8 * 102 + 6 *


101 + 7 * 100

In general, an n-digit number dn−1dn−2…d1d0 (where n is any


positive integer and each d ∈ [0, 1, 2, …, 9], where 0 < i < n )
in a base-10 number system can be rewritten as

dn−1 * 10n−1 + dn−2 * 10n−2 + … + d1 * 101 + d0 * 100

In fact, a number system can be based on any whole


number other than 0 and 1. There is a base-7 system for
weeks, a base-12 system for the Chinese zodiac and imperial
foot and inch, and a base-24 number system for the 24-hour
clock. A long list of different numbering systems that have
appeared since prehistory can be found at
https://en.wikipedia.org/wiki/List_of_numeral_systems.
In general, a base-Q number system will require Q unique
symbols representing 0, 1, … Q−1, respectively. The base-10
equivalence of an n-digit base-Q number dn−1dn−2…d1d0 can
be represented as

dn−1 * Qn−1 + dn−2 * Q−2 + … + d1 * Q1 + d0 * Q0

The evaluation of the expression above will result in its base-


10 equivalence. This is how we convert a number from base-Q
to base-10.
For Q = 2, the numbers 0 and 1 are used to represent digits;
for Q = 3, the numbers 0, 1, and 2 are used; for Q = 8, the
numbers 0, 1, 2, 3, 4, 5, 6, and 7 are used; for Q = 16, the
numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a/A, b/B, c/C, d/D, e/E, and
f/F are used.
The expression above also shows how to convert a number
from base-10 to base-Q: divide the number by Q repeatedly,
and the remainders will be the digits. The details of these
conversions can be found on the internet.
For a number dn−1dn−2…d1 d0 in a base-Q number system, it
is often necessary to add Q as a subscription of the sequence,
as shown below:

dn−1dn−2…d1d0Q or (dn−1dn−2…d1d0)Q

This explicitly indicates that the number is in a base-Q number


system. For example, number 657 in a base-8 number system
will be written as 6578 or (657)8, especially if the context does
not indicate which number system the number is in.
All number systems have the same operations that we are
already familiar with in a base-10 system, such as addition,
subtraction, multiplication, and division. The only difference is
that in a base-Q number system, a 1 carried to or borrowed
from a higher digit is equal to Q instead of 10.
For example, in a base-2 number system, 101 can be written
as 1 * 22 + 0 * 21 + 1 * 20, and its 10-base equivalence is 1 *
4 + 0 + 1 = 5, and for 101 + 110, the operation is

101 110
+ 110 − 101
______ ______
1011 001

Given the four basic mathematical operations—addition,


subtraction, multiplication, and division—it is very simple to
prove that multiplication can be done by repeated addition,
whereas division can be done by repeated subtraction.
Therefore, if you know how to do addition and subtraction and
are able to count, you will be able to do multiplication and
division as well.
More importantly, because a − b can be rewritten as a +
(−b), you may be able to eliminate subtraction if you can
represent −b without the minus sign. In a base-Q number
system, (a − b) can be conveniently handled through a + b′, in
which b′ is the Q-complement of b representing (−b).
Given a negative number, −N, in which N is called the
magnitude of −N, how do you get N′, the Q’s complement to
N? It turns out to be very easy.
For a number N written as dndn−1…d0 in a base-Q number
system, its Q-complement N′ is a number, also in a base-Q
number system, such that N + N′ = Qn, and N′ can be easily
calculated in the following two steps:

1. For each di in dn−1dn−2…d0, find ti such that di + ti =


Q−1, to get tn−1tn−2…t0
2. Add 1 to tn−1tn−2…t0 to get N’s complement
cn−1cn−2…c0

For b in a − b, if b has fewer digits than a, add 0s to the left of


b to make up the missing digits before working on the above
steps. For example, for 768 − 31, do 768 + (−31) or 768 + the
10’s complement of 31.
To get 10’s complement of 31, first add one 0 to the front of
3 to get 031, then find out the 10’s complement of 031, which
is 968 + 1 = 969. Then do 768 + 969 to get 1737, and ignore
the last carried digit, 1, to get 737, which is the result of 768 −
31.
It is easy to see that if C is N’s complement, then N is C’s
complement as well. Using the notation given above, this can
be written as (N′)′ = N.
What about floating-point numbers—that is, numbers with
fractions, such as 3.1415926?
In a base-Q number system, a floating-point number can be
represented much like integers, as shown below:

dn−1 * Qn−1 + dn−2 * Qn−2 + … + d1Q1 + d−1 * Q−1 +


d−2 * Q−2 + … + d−mQ−m

This may give us a hint that a floating-point number can be


represented by two sequences of digits: one for the integer
portion and the other for the fraction portion. If floating-point
numbers are represented this way in computers, addition and
subtraction could be performed on the two portions
separately, but with a mechanism to deal with carrying from
the fraction to the integer in the case of addition, and a
mechanism to deal with borrowing from the integer to the
fraction in the case of subtraction. This would be rather
clumsy, and it would be even more clumsy when doing
multiplication and division.
In reality, floating-point numbers are represented in
scientific notation, such as 1.3 * 102 in a base-10 or decimal
system, where 1.3 is called the fraction, 2 is called the
exponent, and 10 is the radix. In a base-2 system, the radix
would be 2.
In scientific notation, arithmetic operations on floating-point
numbers can be easily done, especially if the fractions of all
floating-point numbers are normalized—that is, if the number
of digits before the radix point is fixed for all floating-point
numbers. For example, to perform the addition or subtraction
of two floating-point numbers, all you need to do is shift the
digits of one floating-point number based on the difference of
the two exponents, then perform addition or subtraction in the
same way as on integers. More surprisingly, multiplying and
dividing floating-point numbers in scientific notation is much
easier than adding and subtracting. There is no need to shift
the digits because

a * rm * b * rn = a * b * rm+n

and

a * rm / b * rn = a / b * rm−n

All you need to build a computer capable of adding,


subtracting, multiplying, and dividing in a base-Q number
system is the ability to add and count, which is needed for
multiplication and division. Moreover, counting itself can be
done by addition when counting up or subtraction when
counting down. This is very encouraging.
The following discoveries are even more encouraging:

• Many mathematical and scientific problems can be


represented and reformulated based on the basic
mathematical operations discussed above.
• If we can build a computing device capable of doing
basic mathematical operations, the machine can solve
many computing and information processing
problems.

The remaining question is how to make such a machine work


faster. On a computing machine with only an addition and
counting unit, if each step of an operation has to be enabled
by a human, the computation would be very slow because it
would have to wait for the human to input instructions and
data. To speed things up, the entire problem solving process
needs to be automated. This requirement has led to the
introduction of memory to computing machines to store both
the operating instructions (the program) and data needed
during the computation. For the central processing unit (CPU)
and memory (RAM) to communicate and work together, a
communication channel and control unit need to be added. For
human users to communicate with the computing machine,
input and output units are also needed. Together these include
everything described in Von Neumann’s architecture for
modern computers.

Computability and Computational Complexity


Now comes the question of how powerful the computing
machine described above can be. In particular, we should ask,

• What problems can or cannot be computed with a


computing machine?
• How difficult is it to solve a given problem with a
computing machine, assuming that the machine can
take as many steps and use as much memory as
needed to solve the problem?

Answering the first problem is the study of computability.


Answering the second question is the study of computational
complexity.
A well-known computability problem was raised by David
Hilbert, a very famous German mathematician in the 19th
century. The 10th problem in his list of 23 important
mathematical problems he published in 1900 is the
decidability problem, which is about finding an algorithm that
can determine whether a Diophantine equation such as xn +
yn = zn, where n is an integer and greater than 2, has integer
solutions. It was proved in 1970 that such an algorithm
doesn’t exist, meaning that the problem of deciding whether a
Diophantine equation has integer solutions is unsolvable, or
incomputable.
Between the 1930s and 1940s, before the existence of
modern computers, Alan Turing invented a simple yet powerful
abstract machine called the Turing machine. He proved that
the abstract machine could simulate the logic of any given
algorithm and further determine whether an algorithm is
computable. The operation of the machine will halt if the
algorithm is incomputable. During the same time,
computability was also well studied by Alonzo Church based
on lambda calculus. The two works later intertwined in a
formal theory of computation known as the Church-Turing
thesis.
In computer science, the computational complexity of an
algorithm devised to solve a problem is about the number of
resources—CPU time and memory, in particular—needed to
run the algorithm on a computer. A problem may be solved in
different ways using different algorithms with different
computational complexities. Sometimes it is necessary to find
a better algorithm that runs faster and/or uses less memory.
The time required to run an algorithm is also related to the
size of the problem to be solved. For example, finding
someone in a classroom would be much easier than finding
someone in a city. If you denote the size of a problem with n,
then in computer science, O(f(n))—called the big O of f(n)—is
used to describe asymptotically the upper bound of running
time: the time complexity of an algorithm for solving the
problem.
For example, assume you want to sort the numbers in a list.
The size of the problem will be the number of numbers in the
list. One algorithm is called selection sort, which begins with
selecting the smallest number from the list, then selecting the
smallest number from the remaining of the list, and so on.
Assume the size of the list is n. The first time it will need to do
n − 1 comparisons. The second time it will need n − 2
comparisons. When these are only two numbers left in the list,
only one comparison is needed to finish. So the complexity of
the algorithm in terms of the total number of comparisons
needed will be
(n − 1) + (n − 2) + (n − 3) … + 2 + 1 = (n − 1 + 1) /
2 * (n − 1) = n * (n − 1) / 2 = (n2 − n) / 2 = O(n2)

You may have noted in the big-O notation that we have kept
only the highest-order term and have removed the constant ½
as well. This is because, with the big-O asymptotic notation,
only the scale of complexity increased when the size of the
problem increases is of interest.
In computer science, problems can be classified as P (for
polynomial), NP (for nondeterministic polynomial), NP-
complete, or NP-hard problems. A problem is said to be in P if
it can be solved using a deterministic algorithm in polynomial
time—that is, if the complexity is a big O of a polynomial. A
problem is said to be in NP if it can be solved with a
nondeterministic algorithm in polynomial time. A problem is
NP-complete if a possible solution can be quickly verified but
there is no known algorithm to find a solution in polynomial
time. A problem is NP-hard if every NP problem can be
transformed or reduced to it within polynomial time.
In the above, a deterministic algorithm refers to the one in
which, given the same input, the output would always be the
same, whereas a nondeterministic algorithm may give
different outputs even for the very same input.
The complexity of algorithms, which is closely related to the
response and processing speed of programs and computer
systems, is the concern of good programmers, especially when
dealing with resource-intensive applications. It is also an
important topic to be studied in senior or graduate courses in
computing and computer science. When writing a program or
just a function for assignments or an application, always think
about the time and space complexity and ask yourself, Is there
a better way to get the job done?

The Construction of Modern Computers


In general, computers can be categorized into two types:
analog computers and digital computers. The computers in
use today are almost all digital computers. But analog
computers do have their advantages.

ANALOG COMPUTERS
As a computing machine, an analog computer uses the
properties of certain objects or phenomena to directly
analogize the values of variables (such as the speed of a
vehicle) of a problem to be solved. Examples of the properties
include the voltage and amperage of electricity, the number of
teeth of a gear, or even the length of a wood or metal stick.
Analog computing machines were often built for some
special purpose, with a very wide range of difficulties and
complexities. A simple analog computer could be built with
three gears for addition and subtraction. For addition, using
both operands to drive the third gear in the same direction will
yield the sum of the two operands on the third gear, whereas
for subtraction, the difference can be calculated by driving the
two gears in two different directions.
Historically, even as early as 100 BC, complicated analog
computing machines were built for various applications, from
astronomy in ancient Greece to the differential machine for
solving differential equations in the late 1800s and early
1900s. Some of the most complicated analog computing
machines in modern history include those for flight simulation
and gunfire control. Analog computing machines continued
well into the early age of modern digital computers because
the special applications analog computers were developed for
were still too hard for digital computers in the 1960s or even
1970s.

DIGITAL COMPUTERS
Different from analog computers, digital computers use
sequences of digits to represent the values of variables
involved in the problems to be solved. In digital computers,
the machine representation of a problem is often abstract,
with no analogy to the original problem.
Theoretically, in accordance with the earlier discussion
about general number systems, digital computers’ digits can
be in any base, from 2 up. Hence a digital computer could be
base-2, base-3, … base-10, base-16, and so on. The digital
computers we are using today are all base-2, or binary,
computers, although it has been proved that base-3
computers would be even more efficient than base-2
computers.
This is because it is more convenient and cheaper to build
components with the two easily distinguishable states needed
to represent base-2 numbers.
Also, in a binary system, signed numbers can be naturally
represented using the highest sign bit: 0 for positive numbers
and 1 for negative numbers, for example. Moreover, the
addition and subtraction of signed binary numbers can be
easily done by using 2’s complements to represent negative
numbers.
For example, to do −2−3, we would do

(−2) + (−3)

or

(−00000010)b + (−00000011)b

Next, we need to convert (−00000010)b and (−00000011)b


into their 2’s complement representations. According to the
two steps we described in the section above, “Number
Systems and the Foundation of Computing,” with Q = 2, you
first get 1’s complement of the magnitude of each negative
number above by flipping each bit, then adding 1 to 1’s
complement, as shown below:

(00000010)b (1’s complement by flipping each bit) →


(11111101)b (then + 1) → (11111110)b
(00000011)b (1’s complement by flipping each bit) →
(11111100)b (then + 1) → (11111101)b

The addition above will become

(11111110)b + (11111101)b

which is equal to

(11111011)b

The 1 on the highest bit of the result means that the result is
2’s complement representation of a negative number.
Interestingly, the magnitude of the negative number is the
complement of (11111011)b, which is

(11111011)b (1’s complement by flipping each bit) →


(00000100)b (then + 1) → (000000101)b,

which is 5, meaning that the result of −2−3 is −5.


It is very easy to calculate the 2’s complement of a binary
number. Adding a negative number can be done by adding its
2’s complement. That is the advantage that the binary system
has offered for the construction and development of modern
digital computers.
As such, in principle, the key component needed in our
modern digital computers for computing and information
processing is a unit to add two binary numbers, since the
three other basic arithmetic operations can be done based on
addition, using respective algorithms or routines such as the
ones mentioned above. In the real implementation and
construction of digital computers, all basic arithmetic
operations, including bitwise operations on integer binary
numbers such as the operations needed to find 2’s
complements, are hardwired into a unit called the arithmetic
logic unit (ALU), which is the core of the central processing
unit (CPU) that you have heard about often.
A digital computer also needs to compute real or floating-
point numbers as well as process graphics. To get these two
jobs done more efficiently, modern computers also have a
floating-point unit (FPU) for floating-point numbers, and a
graphics processing unit (GPU) for graphics.

MECHANIC-BASED COMPONENTS
Mechanical components such as levels, gears, and wheels can
be used to build analog computers. In fact, digital computers
can also be built with mechanical components. The earliest
special-purpose mechanic-based digital computer was the
difference engine designed by Charles Babbage. A general-
purpose mechanic-based digital computer, called the
analytical engine, was also first proposed by Charles Babbage.
In the design, the machine has memory and CPU. It would
have been programmable and, therefore, would have become
a general-purpose digital computer, if ever actually built.

VACUUM TUBE–BASED COMPONENTS


Invented in 1904 by John Ambrose Fleming of England, a
vacuum tube is a tube made of glass with gas/air removed,
with at least two electrodes inserted for allowing or controlling
the flow of electrons. Vacuum tubes can be made to be
switches or amplifiers. As switches, the two states of on and
off can be used to represent the 0 and 1 of binary arithmetic
or Boolean logic. When the state of output can be controlled
by input or inputs, the switch is made to be a gate to perform
different logical operations. That’s how vacuum tubes could be
used to implement modern computers; as amplifiers, they
found their uses in many electronic devices and equipment
such as radio, radar, television, and telephone systems. It was
the vacuum tube that made electronic computers and other
electronic devices possible for the first time. Vacuum tubes
played very important roles in the development and
construction of all electronic devices and systems in the first
half of the 20th century.
However, vacuum tubes disappeared from computers and
most other electronic devices soon after transistors were
developed at the Bell Laboratories by John Bardeen, Walter
Brattain, and William Shockley in 1947 because, compared to
transistors, vacuum tubes were too big, too heavy, too
unreliable and consumed too much power to operate. That
limited the construction and uses of vacuum tube–based
computers and devices.

TRANSISTORS
Recall that in the construction of computers, the ALU or CPU
requires two-state switches to represent 0 and 1 and logical
gates to perform additions and subtractions of binary number
systems. Vacuum tubes could be made to construct electronic
computers, but the computers became too bulky and too
heavy to be more useful.

INTEGRATED CIRCUITS AND VERY LARGE-SCALE


INTEGRATED CIRCUITS
Integrated circuits (ICs) are chips with many electronic circuits
built in, while very large-scale integrated (VLSI) circuits are
those with millions and even billions of electronic circuits built
into very small semiconductor chips. According to Moore’s law
(attributed to Gordon Moore, the cofounder and former CEO of
Intel), the number of transistors in a dense integrated circuit
doubles about every two years. This has been the case over
the last few decades since 1975, though advancement in VLSI
technology has slowed since 2010.
Today, computers are all using VLSI chips. That is why
computers have become smaller and smaller, while computing
power has increased exponentially in accordance with Moore’s
law.

1.3 Programming and Programming Languages


One of the key principles of modern computers is using stored
programs, which are sequences of instructions telling
computers what to do. The task of writing programs for
computers is called programming.
During the first generation of computers, machine
languages and assembly languages were used to write
programs. Machine languages use sequences of 0 and 1 to
code instructions for computers. Programs in a machine
language can be directly understood by the CPU of the target
computer. The following is an example of machine language
for the Intel 8088 CPU:

00000011 00000100
10001000 11000011

As you can see, although machine language is friendly to


computers, it is not friendly to people, because the instruction
itself does not tell us what it does in a human-readable
language. To solve this problem, assembly language was
invented. The two instructions above are written in assembly
language as follows:

ADD AX, [SI]


MOV BL, AL
The instruction in assembly language is much more friendly
to people because one can more easily tell what each
instruction does. However, assembly language is not as
friendly to computers. For computers to understand programs
in assembly language, an assembler is needed to translate the
programs into code in machine language.
With assembly language, programming is still a difficult task
because instructions in an assembly language are mostly
direct mapping of their machine-language equivalent and only
describe fine and tiny steps of CPU operations. It is difficult to
program in assembly language to solve real-world problems.
The idea of using a high-level, more human-friendly
programming language was attributed to Konrad Zuse for his
work between 1942 and 1945. He developed a high-level
programming language called Plankalkül for a non–
Von Neumann computer called Z4 that he made during the
same period of time. The language was not implemented and
used on Z4 or any other real computer during that time, but
Konrad Zuse did write a computer chess program in the
language.
The first high-level programming language for our modern
computers (Von Neumann machines) is ALGOL 58, but it was
soon surpassed by ALGOL 60, a structured programming
language.
During the second generation of modern computers, more
than 100 high-level programming languages were developed.
The most popular programming languages include COBOL, for
programming business systems; Fortran (an imperative
procedural programming language), for scientific calculation;
ADA, used by the military and National Defense in the US; Lisp
(a functional programming language), used for symbolic or
information processing; and Prolog (a logic programming
language), for logic programming, especially during the first
revival of artificial intelligence in the 1980s. There have been
thousands of programming languages since the invention of
the modern computer, according to the list at
https://en.wikipedia.org/wiki/List_of_programming_languages.
However, most of these programming languages have never
been used in real application development. The most popular
programming languages used today include Python, Kotlin (for
Android applications), Java, R (for data analysis and machine
learning), JavaScript, C++, C#, PHP, Swift (for iOS
applications), Go, and C, which has been a popular language
for more than half of the century and is considered a
foundational language of many other popular programming
languages.
High-level programming languages are friendly to people
but not friendly to computers. For computers to understand
and execute programs written in a high-level programming
language, they must be translated into machine language.
Based on how programs in high-level languages are translated
into target machine language, high-level programming
languages are either compiled or interpreted. A program
written in a compiled programming language such as C or
C++ needs to be compiled into its target machine’s codes and
linked with copies of code in static libraries, or linked with
references to code in dynamic or shared libraries, so that the
resulting object can then be executed by the target computer.
Programs written in an interpreted programming language
can be executed directly by the interpreter of the
programming language, in view of programmers and users.
Behind the scenes, however, to speed up the execution of
programs written in an interpreted programming language,
the programs are often translated first into some intermediate
codes, often called bytecodes. The bytecodes are then
executed within a so-called virtual machine built into the
interpreter of the programming language.
More readings about the history of computer programming
languages can be found on the internet by searching for
“history of computer programming.” The following are some of
the articles:
https://en.wikipedia.org/wiki/History_of_programming_languages
http://www.softschools.com/inventions/history/computer_programming_hist
ory/369/
https://www.datarecoverylabs.com/company/resources/history-computer-
programming-languages
https://www.computerhistory.org/timeline/software-languages/
https://www.thecoderschool.com/blog/the-history-of-coding-and-computer-
programming/

A good overview of programming languages can be found at


https://en.wikipedia.org/wiki/Programming_language.
It is worth noting that although well-formed computer
programming languages only came into existence in the late
1940s, Ada Lovelace, an English mathematician who lived
between 1815 and 1852, is considered the first computer
programmer. When she was commissioned to translate an
article based on Charles Babbage’s speech about his
analytical engine, she wrote extensive notes alongside the
translation to explain the principles and mechanism of the
analytical engine. Those notes were later considered to be the
first computer programs in history. For example, one set of
those notes would calculate a sequence of Bernoulli numbers
if executed on the analytical engine.

1.4 Python Programming Language


Python is an interpreted, high-level, general-purpose
programming language. It is one of the most popular
programming languages in the world, second only to Java. The
2023 rankings for programming language popularity can be
found at https://www.hackerrank.com/blog/most-popular-
languages-2023/.

The Development and Implementation of Python


Python was originally conceived and developed in the
Netherlands by Guido van Rossum in the late 1980s. Its first
release was Python 0.9.0 in 1991. Python 2.0 was released in
2000, nine years after the release of Python 0.9.0.
Most of the development of Python was accomplished
between 2005 and 2013, when Guido van Rossum was
working at Google, where he spent half of his time on the
development of the programming language. The latest Python
2 release is Python 2.7.16, whereas the latest release of
Python 3 is Python 3.9.0, at the time of writing.
Python is an interpreted programming language rather than
a compiled programming language. Programs written in
Python don’t need to be compiled into target machine code.
Instead, they only need to be translated into bytecodes, then
executed by a Python Virtual Machine (PVM), which is built into
the Python interpreter.
Python language has different implementations with
different names. CPython, written in C and known simply as
Python, is what we will be using, and it is the implementation
you will get from Python standard distribution at python.org by
default. In addition to CPython, the following are some
alternative implementations of Python:

1. JPython or Jython, and implementation for running on


Java Virtual Machine (JVM)
2. IronPython, an implementation for running on .NET
3. PyPy, an implementation for working with a just-in-
time (JIT) compiler
4. Stackless Python, an implementation of a branch of
CPython supporting microthreads
5. MicroPython, an implementation for running on
microcontrollers

These implementations may be of interest only for some


special applications.
Advantages of Python
Python was designed with the principle of “programming for
everyone.” Programs written in Python are clean and easy to
read. Yet Python is a general-purpose programming language
and very powerful to code in. Programming in Python has the
least overhead, especially when compared to Java. Let’s take
the famous “Hello World!” application as an example. In Java,
to create this application, you need to write a class with a
main method like the following:
class first {
public static void main(String args[]){
System.out.println("Hello World!");
}
}

Then save it to a file and compile the file into Java bytecode
by running the following command, provided you have a JDK
correctly installed:
javac myhelloworld.java

This command will generate a file named first.class. You can


then run command java first to have “Hello World!” spoken
out.
In Python, however, you only need to write the following
code and save to a file, say, myhelloworld.py:
print("Hello World!")

Then run the following command:


python myhelloworld.py

More importantly, Python supports different programming


paradigms, including structured programming, imperative
programming, object-oriented programming, functional
programming, and procedural programming. Logic
programming is probably the only exception; it is not
supported by Python.
Python is very powerful for two reasons. The first reason, as
you will see later, is that Python has many powerful language
constructs and statements to represent data and operations
on various data. The second reason is that there are
thousands of third-party packages/libraries/modules available
for all kinds of programming needs in addition to the large
standard libraries included with every release of Python. For
example, Python is widely used for data analytics and machine
learning with the support of the NumPy, SciPy, Pandas,
Matplotlib, and TensorFlow libraries.

Resources for Python and Python Education


The ultimate resource for Python and API libraries is the official
website of the Python software foundation at
https://www.python.org/. From that website, you will be able to
access all the releases of Python and other packages and
libraries that you may be interested in, in addition to the
standard libraries that come with the official release of Python.
At the time of writing, the latest release of Python is 3.11.1,
but you can always check and locate the latest release for
your platform at https://www.python.org/downloads/. However,
for your convenience and for your future study and use of
Python, we will use a package management system called
Anaconda to install and manage Python and all tools and
libraries that you will need for this textbook, as detailed later.
There are plenty of resources on the internet for eager
learners to learn almost anything, including programming in
Python. To learn effectively on the internet, however, a learner
must be able to choose the right materials from thousands—
even millions—of choices, and that has proved to be a very
difficult task. That’s probably one of the reasons why
universities and professors are still needed: to set the right
learning paths and to select the right resources for learners.
On the internet, the most authoritative learning source
about the Python language is the documentation
(https://docs.python.org/3/), including language references
(https://docs.python.org/3/reference/index.html) and library
references (https://docs.python.org/3/library/index.html),
although they may not be articulated for beginners.
For learners who prefer to learn by reading, the following are
some of the best resources on the web:

• https://docs.python.org/3/: This resource is from the


official Python website, so the terms and jargons used
should be deemed official at least within the Python
community. It is a comprehensive section as well.
• https://www.w3schools.com/python/: This is a very
popular site that offers resources covering many
different languages.
• https://www.learnpython.org/: This is another good site
for learning Python. it has many resources on specific
topics.

For learners who love to watch videos and lectures, the


following are recommended:

• Python Crash Course for Beginners, at


https://www.youtube.com/watch?v=JJmcL1N2KQs, by
Traversy Media. This video uses VS Code IDE to
illustrate the program examples so that you can follow
along once you have the required programming
environment set up.
• Learn Python—Full Course for Beginners, at
https://www.youtube.com/watch?v=rfscVS0vtbw, by
freeCodeCamp.org and narrated by Mike Dane. This
video is one of the best. Please note that the video
lecture recommends the installation and use of
PyCharm IDE. However, the installation and use of VS
Code IDE is required in this book.
1.5 Getting Ready to Learn Programming in
Python
To learn the content covered in the rest of this book, you first
need to have the following installed on your computer:

1. A newer version of Python from


https://www.python.org/. The latest version, at the
time of writing, is Python 3.11.1. The standard
distribution includes everything you need to interpret
and execute Python programs, which are also called
Python scripts.
2. A newer version of Jupyter Notebook, from
https://jupyter.org/. Jupyter Notebook is a powerful
interactive programming environment supporting up
to 40 programming languages, including Python.
3. A newer version of Visual Studio Code (VS Code) from
https://code.visualstudio.com/. VS Code is a free and
open-source code editor developed by Microsoft, and it
will be used as an integrated development
environment (IDE) and to host Jupyter Notebook for
interactive programming.

In this section, we will learn how to install Python, Jupyter


Notebook, and Visual Studio Code IDE on our computer. A
standard distribution of Python includes a large volume of
libraries for general programming needs. Special applications
such as those in data science and machine learning will
require special libraries to be installed. We will learn about
that in later units when we need them.

Installing and Setting Up the Python Programming


Environment
There are different ways of setting up your Python
programming environment. The method we present below is
believed to be more reliable and less subject to future
changes.

INSTALLING PYTHON
The first package we need to install is Python. The steps are as
follows:

1. To ensure a clean installation of Python, uninstall all


old versions of Python that may have previously been
installed on your computer and check the value of the
PATH environment variable to delete all those, and
only those, related to Python. To ensure that all have
been deleted properly, open a shell terminal such as
CMD or PowerShell on Windows and check if a Python
installation still exists by trying to run it. You should be
told that Python is not recognized.
2. Go to https://www.python.org/downloads/ and look for
the newest release of Python for your platform. For
example, if you want to install Python on your
Windows machine, download the latest release for
Windows. Normally, the website should be able to
detect the type of system you are using to access the
website and show you the right Python package for
you to download. You should, however, be aware of
what you will be getting from the website.
3. Run the installer to install it. If installing Python on a
Windows platform, all you need to do to start the
installation is to double-click the downloaded file or
press the run button if it does not start the installation
automatically.
After the installation has started, a window will pop up,
as shown here:

Python 3.11.1 (64-bit) Setup


----------------------------------

Install Python 3.11.1 (64-bit)


Select Install Now to install Python with default settings, or choose Customize to
enable or disable features.

→ Install Now
C:\Users\james\AppData\Local\Programs\Python\Python311

Includes IDLE, pip and documentation


Creates shortcuts and file associations

→ Customize installation
Choose location and features

☑ Use admin privileges when installing py.exe


☑ Add gython.exe to PATH!

Cancel

You can either let it install Python automatically for


you by clicking “Install Now” or choose “Customize
installation.” When you choose “Customize
installation,” you have the opportunity to choose
where Python will be installed on your computer and
what optional modules and features will be installed.
In either case, you must check the box to add Python
to the PATH environment variable. Choose yes to add
Python to the system PATH environment variable so
that Python and other related commands can be
found.
Do a customized installation so that you will see what
is to be installed and where. When doing customized
installation, remember to check the box to install pip,
Python package manager, and other components
within the distribution, as shown here:
Python 3.11.1 (64-bit) Setup
----------------------------------

Optional Features

☑ Documentation
Installs the Python documentation files.

☑ pip
Installs pip, which can download and install other Python packages.

☑ td/tk and IDLE


Installs tkinter and the IDLE development environment.

☑ Python test suite


Installs the standard library test suite.

☑ py launcher ☑ for all users (requires admin privileges)


Use Programs and Features to remove the 'py' launcher.

Back Next Cancel

Check the following advanced options, as shown here:

Python 3.11.1 (64-bit) Setup


----------------------------------

Advanced Options

❑ Install Python 3.11 for all users


☑ Associate files with Python (requires the 'py' launcher)
☑ Create shortcuts for installed applications
☑ Add Python to environment variables
❑ Precompile standard library
❑ Download debugging symbols
❑ Download debug binaries (requires VS 2017 or later)

Customize install location


d:\Programs\Python\Python311
You will require write permissions for the selected location.

Back Install Cancel

To check whether Python has been installed


successfully on your computer, open a shell terminal
and run the following command:
$ python --version

If the installation was successful, the version of Python


will be displayed and should be the same as the one
you have downloaded from python.org.

SETTING UP A VIRTUAL ENVIRONMENT FOR A PYTHON


PROJECT
When programming in Python, you will need a Python
interpreter and any additional libraries required for the project.
Libraries required for one project are different from those for
other projects. To ensure that each project has the right
programming environment without interfering with others,
Python uses a technology called a virtual (programming)
environment, which can be created and activated for each
project. When you work in a virtual environment for a specific
project, all installations of additional libraries will be used only
for that specific project.
To create and use a virtual environment, take the following
steps:

1. Check whether you have a tool called pipenv installed


with your Python installation by running the following
command on Windows:
where.exe pipenv

or the following command on Linux or Mac:


which pipenv

If it is installed, the command will tell you where it is


located on your computer, and you can go to step 3.
2. If the command cannot be located on your system,
you will need to install it by running the following
command on a shell terminal:
pip install pipenv

If you are running the shell terminal as a regular user,


pipenv will be installed under your home directory, so
that you will have to add the location to the
environment variable PATH. It is better to start a shell
terminal as an administrator, then run the above
command as root/administrator to ensure that pipenv
will be installed globally and be accessible for all users
with the already set value for PATH.
3. Once you are sure that pipenv is installed, create a
directory for your new project and change the work
directory to that directory, say c:\dev\testproject as an
example, by running the following commands in
sequence:
c:\dev> mkdir testproject
c:\dev> cd testproject

4. Within the testproject directory, run the following


command:
c:\dev\testproject> pipenv install

This will create a virtual environment for your project


rooted at c:\de\firstproject.
5. To work on the project with the virtual programming
environment, you need to activate the virtual
environment for the project by running the following
command within the project directory:
c:\dev\testproject> pipenv shell
Once the virtual environment has been activated, the
prompt of the shell terminal will become something
similar to the following:
(testproject-UCP5-sdH)c:\dev\testproject>

Please note the text within the parentheses. It


contains the name of the project directory. It means
that you are now working in a subshell terminal
invoked by pipenv.
6. From now on, any package installed by running the
pip command on this subshell terminal will be only
part of this virtual environment, without interfering
with installations elsewhere for other projects.
7. To get out of the virtual environment, simply type
“exit” to close the subshell, as shown below:
(testproject-UCP5-sdH)c:\dev\testproject>exit

The prompt will become


c:\dev\testproject>

8. If you want to remove the virtual environment


created for a project, run the following command
within the subshell on the root of the project directory:
(testproject-UCP5-sdH)c:\dev\testproject> pipenv -- rm

INSTALLING JUPYTER NOTEBOOK


The second package that needs to be installed is Jupyter
Notebook. The steps are as follows:

1. After you have successfully installed Python, install


Jupyter Notebook with pip, the Python package
manager that comes with the Python installation, by
running the following command at a shell terminal:
Random documents with unrelated
content Scribd suggests to you:
257: Voyez p. 341, Ire partie.

258: En 1041, Louis IX, plus puissant que Henri, établit, à son
retour de la croisade, une autre trève, dite la quarantaine le roi, par
laquelle il étoit défendu atout seigneur de songer à se venger de son
ennemi avant quarante jours. Depuis, et par une ordonnance datée
de Corbeil en 1257, il abolit entièrement ces sortes de guerres,
chargeant les sénéchaux de punir tous ceux qui voudroient se faire
justice par les armes; mais cette ordonnance n'atteignit encore que
les vassaux du second ordre.

259: Il la soupçonnoit d'infidélité, et principalement d'avoir eu


quelque liaison en Syrie avec le prince d'Antioche, son oncle
paternel. Par ce divorce il lui rendit la Guienne et le Poitou, qu'elle
avoit apportés en mariage; et six semaines après, cette princesse
donna ces provinces à Henri, comte d'Anjou et duc de Normandie,
qu'elle épousa. Il étoit déjà déclaré successeur du roi d'Angleterre, et
se trouva depuis, sous le nom de Henri II, souverain de ce royaume,
duc de Normandie et d'Aquitaine, comte d'Anjou, de Poitou, de
Touraine et du Maine. Philippe-Auguste lui enleva depuis quelques-
unes de ces provinces, mais la puissance des Anglois n'en fut pas
moins très-grande en France, et l'on sait les maux qu'elle y causa.
Peu s'en fallut qu'ils ne la subjuguassent entièrement: et nous
verrons, par la suite, ces insulaires maîtres de presque toutes nos
provinces, leurs rois déclarés successeurs des rois de France, et
régnant déjà dans Paris. Suger avoit prévu ce qui arriva; et s'étoit
fortement opposé à une action si préjudiciable à l'État. Elle ne fut
consommée qu'après sa mort, arrivée en 1152.

260: En 1223.

261: L'université, qui jusque là n'avoit point eu de sceau particulier,


et dont les actes étoient scellés par le chancelier de l'église de Notre-
Dame, prétendoit se délivrer de cette sujétion. Le légat, qu'elle prit
pour juge de son différend avec l'église, rompit publiquement le
sceau qu'elle avoit fait, et anathématisa d'avance ceux qui oseroient
en faire un autre. Ce fut cet acte insultant qui alluma la fureur des
écoliers. Maîtres et élèves, tout fut excommunié, et cette
excommunication ne fut levée qu'au concile de Bourges, où quatre-
vingts docteurs de Paris se rendirent pour obtenir l'absolution du
légat, qui la leur accorda sur-le-champ.

262: Ces confédérés étoient Thibaud VI, comte de Champagne;


Pierre de Dreux, dit Mauclerc, comte de Bretagne; Philippe, comte
de Boulogne, oncle du roi; Hugues de Lusignan, comte de la
Marche; Jeanne, comtesse de Flandre; Enguerrand de Couci; les
comtes de Ponthieu, de Châtillon, etc., etc.

263: Il faut observer qu'alors la plupart de ceux qui portoient le


nom d'écoliers étoient des hommes faits qui venoient à Paris de
toutes les parties de l'Europe et de la France, pour y suivre les cours
de théologie, de droit et de philosophie.

264: Quelques professeurs s'établirent à Angers et à Orléans; et l'on


croit que ce fut là l'origine de ces deux universités. D'autres
passèrent en Bretagne et en Angleterre, chez les ennemis les plus
acharnés de la régente, où l'on s'empressa de leur donner asile et
protection.

265: L'ordre des frères prêcheurs venoit d'être fondé en Espagne


par saint Dominique, et saint François d'Assise avoit fondé en Italie
celui des frères mineurs, à peu près dans le même temps.

266: Il s'étoit également acquis la confiance de l'empereur Frédéric


II et de Grégoire IX, dans ces démêlés si fameux qui amenèrent la
fin de la maison de Souabe; tous les deux le consultoient, et il ne
tint pas à lui que cette lutte cruelle dans laquelle tous les torts
étoient évidemment du côté de l'empereur, ne se terminât par une
paix durable.

267: Il est certain que cet affranchissement des esclaves, fait


unique dans les annales du monde, ne pouvoit être conçu et exécuté
avec quelque sûreté que sous l'empire de la loi chrétienne; mais
c'est une grande question de savoir si le moment étoit venu de le
faire, et si cette politique des rois de France que l'on commence à
entrevoir, de chercher dans le peuple des appuis contre la noblesse,
n'avoit pas des inconvénients plus grands que les avantages qu'ils
espéroient en retirer. Peut-être aurons-nous occasion de l'examiner.
Quoi qu'il en soit, il y eut encore des esclaves en France sous les
successeurs de saint Louis; et nous dirons bientôt ce qui se passa
sous Louis X, lorsque ce prince publia une ordonnance en faveur des
serfs. Long-temps après le règne de ce prince, plusieurs seigneurs
continuèrent de maintenir leur ancienne autorité sur les esclaves. Il
paroît même, par une ordonnance du fameux Bertrand Duguesclin,
connétable de France, que la coutume de les affranchir étoit encore
regardée, de son temps, comme une innovation pernicieuse. (Voy.
Roberts, introd., § 20.)

268: Il les fit publier l'an de grâce 1270, avant qu'il allât à Tunis,
dans toutes les cours laies du royaume et de la prévôté de France.
Ce recueil, précieux monument de son zèle pour la tranquillité et le
bonheur de ses sujets, contient 208 articles. C'est proprement un
nouveau code composé de lois romaines, de canons des conciles, de
décrétales ou épîtres des papes, de différentes coutumes de la
monarchie, et d'ordonnances de nos rois. Il prescrivoit des formes
pour les actions réelles ou personnelles, substituoit les preuves par
témoins aux combats judiciaires, régloit les juridictions, établissoit
des lois pour les fiefs, les donations, les successions, les partages,
les affranchissements, des punitions pour les divers crimes, etc.,
etc.; enfin embrassoit presque toute la jurisprudence françoise telle
qu'elle étoit alors. Toutefois, et déjà nous en avons fait la remarque,
ces établissements n'eurent cours dans la France entière que parce
que c'étoient des coutumes générales, dont plusieurs sans doute
étoient tombées en désuétude, mais qui toutes étoient anciennes et
avoient eu force de lois par le consentement des assemblées de la
nation. (Voy. p. 174, 1re partie.)

269: On sait qu'il se plaisoit à rendre lui-même la justice à ses


sujets, et qu'en été il établissoit son tribunal, ou sous les arbres du
bois de Vincennes, ou dans le jardin de son palais de la Cité.
«Tableau touchant de nos antiques mœurs, dit avec raison l'auteur
du Tableau du règne de saint Louis (Collect. des Mém. relat. à l'hist.
de France., t. II, p. 124), dont la poésie et l'éloquence se sont
emparées, pour en proposer l'exemple aux siècles modernes, sans
réfléchir que c'étoit à titre du seigneur féodal, que Louis jugeoit ses
sujets, et que la constitution des monarchies actuelles, entièrement
différente, rend plus ou moins, dans toute l'Europe, la justice
indépendante du pouvoir suprême.» La poésie et l'éloquence de nos
temps modernes se sont emparées de bien d'autres choses, qu'elles
ont également dénaturées et niaisement consacrées.

270: Il ordonna que toutes les femmes folles de leurs corps seroient
chassées des maisons particulières, et défendit à ses sujets de leur
louer aucune habitation où elles pussent faire leur infâme
commerce. Alors on donna un nom odieux aux endroits où elles
furent obligées de se retirer: c'étoient de petites loges, dans
lesquelles il leur étoit défendu de passer la nuit, afin qu'un reste de
pudeur pût contenir les hommes, forcés, pour y entrer, de braver le
grand jour et tous les regards. Ces loges furent appelées bords ou
bordels, du mot saxon bord, qui signifie petite loge; et c'est par
erreur qu'on a cru trouver cette étymologie dans la situation de ces
maisons au bord de l'eau. Les broderies, les boutonnières d'argent et
autres ornements furent interdits à ces femmes perdues; on les
empêcha même de mettre leurs loges dans les grandes rues, et on
les contraignit de se retirer dans les rues de l'Abreuvoir, des
Boucheries, de Froi-Manteau; dans celles de Glatigny, Chapon,
Champ-Fleury, etc.

271: Entre autres mesures rigoureuses, il ordonna que, pour les


distinguer des chrétiens, ils seroient tenus de faire coudre sur leur
robe, devant et derrière, une pièce de feutre d'une palme de
diamètre. Cette marque fut appelée rouelle; et lorsqu'on trouvoit un
juif qui ne l'avoit pas, sa robe étoit confisquée, et il étoit condamné
à dix livres d'amende. Philippe-le-Hardi rendit contre eux, dans la
suite, un arrêt encore plus sévère, en ordonnant qu'ils porteroient
une corne sur leur bonnet; ce qui fut pour eux la plus grande
humiliation qu'ils eussent encore éprouvée. Il leur fut défendu en
même temps de porter des habits de couleur, de se baigner dans les
rivières où se baignoient les chrétiens, etc. Ils n'eurent plus, dès
lors, à Paris, qu'une synagogue, rue de la Tacherie, et un cimetière
rue de la Harpe. Du reste, ils étoient toujours soumis à la servitude,
comme du temps de Philippe-Auguste.

272: Voyez p. 657.

273: Ce prévôt étoit le fameux Étienne Boislève, dont nous avons


déjà parlé. Son grand sens et sa fermeté firent refleurir le commerce
et l'industrie; par l'intégrité de ses jugements il releva l'honneur de
son tribunal, et donna ainsi l'exemple à tous les juges du royaume.
On raconte que saint Louis, satisfait de son zèle, et voulant lui
donner des marques éclatantes de sa satisfaction, le faisoit asseoir
auprès de lui, chaque fois qu'il rendoit lui-même la justice au
Châtelet.

274: Il avoit le même droit, au mariage de ses enfants, et lorsqu'il


partoit pour quelque expédition militaire.

275: Les soi-disant philosophes.

276: C'est ce qu'on appeloit basse-justice (Voy. p. 513.)

277: Cette juridiction temporelle du clergé n'avoit cessé de


s'accroître sous les règnes précédents et jusqu'à saint Louis. Le
désordre, l'anarchie et les violences étant alors à leur comble,
l'église, seul refuge des opprimés, avoit cru devoir employer pour en
arrêter le cours ce qu'elle avoit de lois plus sévères et de plus
terribles châtiments. Sous la minorité du roi, son conseil, fort mal
conseillé sans doute, voulut arrêter le cours de cette justice
salutaire; mais il ne réussit alors qu'à empêcher les juges
ecclésiastiques de mettre en interdit les chapelles du roi. Depuis, les
seigneurs eux-mêmes avoient formé une commission à l'effet de
défendre à leurs vassaux l'appel devant un tribunal ecclésiastique; et
cette commission, qui devoit être permanente, s'étoit même arrogé
le droit de juger de la validité d'une excommunication; mais le pape
menaça, et parvint facilement à rompre cette association. Les rois
eux-mêmes se montroient impatients d'un joug qui avoit été si long-
temps nécessaire à leur propre conservation; et par cette corruption
du cœur que fait naître l'usage même légitime du pouvoir,
cherchoient imprudemment tous les moyens possibles de le briser.

278: Il est dit dans cet acte que le roi seul a la voirie à Paris et dans
toute la banlieue, excepté dans les rues où l'évêque a toutes les
maisons de l'un et de l'autre côté; et que si, parmi les maisons de
l'évêque, il y en a seulement une qui ne soit point à lui, l'évêque
perd la voirie, que le roi ne partage avec personne. Tous les lieux
d'exemptions, comme Saint-Martin-des-Champs, le Temple, Saint-
Germain-des-Prés, Saint-Éloi, Saint-Julien-le-Pauvre, n'ont point de
voirie; le chapitre de Notre-Dame ne l'a que dans le Parvis, et
l'abbaye de Sainte-Geneviève que dans la vieille terre, depuis la croix
Hémon jusqu'à l'abbaye.

279: Ce nombre fut fixé à soixante-dix sergents à pied et trente-


cinq à cheval; mais, quelques années après, le roi en augmenta le
nombre, et permit au prévôt d'avoir quatre-vingts sergents à cheval
et quatre-vingts sergents à pied. Le prévôt de Paris avoit encore
douze autres sergents à pied qui lui étoient particulièrement
attachés, et faisoient auprès de lui l'office de gardes.

280: Voyez p. 146, 1re partie.

281: Il fut reporté avec la même pompe à Saint-Denis. Depuis on en


transféra une côte dans l'église de Notre-Dame, et partie du chef à
la Sainte-Chapelle.

282: Voyez p. 409, 1re partie.

283: «Il est toujours aisé, dit le P. Daniel, de faire le procès à ceux
qui ont administré les finances, soit parce qu'il est rare de se
modérer dans un tel poste, soit parce que, dans un pareil
maniement, il est moralement impossible de rendre compte de
tout.»

284: Ceci va paroître bien extraordinaire, bien prodigieux, bien


incroyable à nos grands prédicateurs de liberté, aux philanthropes
ennemis de la féodalité, qui versent encore tous les jours des larmes
si amères sur le joug de fer dont elle accabloit l'humanité, dans ces
temps d'une aussi effroyable tyrannie; mais il n'en est pas moins vrai
que le plus grand nombre des serfs préféra son argent à la liberté
qui lui étoit si peu libéralement offerte. «Attendu, est-il dit, dans les
lettres du roi, que plusieurs, par mauvais conseil ou faute de bons
avis, ne connoissent pas la grandeur du bienfait qui leur est accordé,
nous ordonnons à nos officiers de les taxer si suffisamment et si
grandement, comme leur condition et leurs richesses pourront
bonnement le souffrir.» (Spicil., t. III, p. 707.) Ceci prouve tout à la
fois et que les serfs se soucioient peu d'être libres, et qu'ils étoient
riches; ce qui devroit cependant ne pas sembler si malheureux à nos
philosophes et à nos libéraux: car tout en estimant la liberté, on sait
qu'ils ne méprisent point les richesses.

285: «C'est pour la première fois, dit le président Hénault, qu'il est
fait mention de la loi salique, qui ne permettoit pas que les femmes
héritassent de la couronne de France.» C'est encore là une de ces
opinions erronées de nos historiens modernes, que nous aurons
occasion d'examiner et de réduire à sa juste valeur. Ce n'étoit point
uniquement par la loi salique, mais par toutes les anciennes lois et
coutumes des Francs, que les femmes étoient exclues de la
succession au trône; et nous dirons pourquoi.

286: Pour cimenter cette paix, les religieux cédèrent à l'université le


patronage des cures de Saint-André-des-Arcs et de Saint-Côme, et
payèrent en outre tous les arrérages d'une rente qu'ils lui devoient
en vertu d'une transaction faite antérieurement entre les deux
parties. Ils convinrent en outre de faire murer la porte qui donnoit
sur le Pré-aux-Clercs, lequel devint, depuis ce moment, une
promenade publique commune aux écoliers et aux habitants de
Paris.

287: C'étoient deux mauvais prêtres, l'un déposé de sa cure pour


ses crimes, l'autre moine apostat de l'ordre de Saint-Benoît. Ces
hommes qui les suivoient étoient des serfs affranchis; et il est
remarquable que rien de pareil n'étoit arrivé avant ces
affranchissements; ce qui semble justifier l'opinion émise dans
l'ordonnance du connétable Duguesclin. (Voyez p. 708.)

288: Il songeoit, quand il mourut, à établir partout un même poids


et une même mesure, et à faire en sorte que, dans toute la France,
on se servît de la même monnoie. Louis XI eut depuis la même
pensée.

Ordonnance faite à Saint-Germain, de laquelle, dit du Tillet, est tirée


la maxime reçue «qu'en fait de justice on n'a égard à lettres
missives; ordonnance sainte de nos rois, pour se garder de surprise
en cet endroit, qui est leur principale charge.» Autre ordonnance qui
règle que les confiscations seront employées à acquitter les rentes à
vie ou perpétuelles; autre qui réunit au domaine les terres que le roi
possédoit avant son avénement à la couronne; autre qui défend aux
maîtres du parlement, présidents ou autres, d'interrompre les
besongnes du parlement; autre au sujet de la discipline de cette
compagnie; autre concernant le gouvernement de son palais, dans
laquelle le roi déclare qu'il n'entendra aucune affaire avant d'avoir
assisté, tous les jours, au saint sacrifice de la messe.

289: Hugues de Cuisy, troisième successeur de Capetal, fut


également pendu dans l'hôtel de Nesle sous Philippe de Valois, pour
prévarications dans l'exercice de sa charge. Ces deux exécutions
diminuèrent beaucoup la considération dont jouissoit la place de
prévôt de Paris.

290: Le collége du Plessis et celui des Écossais.


291: Ce prince fut sévère justicier. Sous son règne, il se fit une
recherche très-rigoureuse des financiers, presque tous Lombards et
Italiens, que l'on accusoit des usures les plus criantes: leurs biens
furent confisqués, et on les renvoya dans leur pays, aussi pauvres
qu'ils en étoient venus. Gérard Laguerre, receveur général des
revenus de la couronne, accusé de malversation, mourut à la
question, sans avoir fait l'aveu du crime qu'on lui imputoit; mais il
est probable qu'on en avoit acquis des preuves suffisantes, car son
corps n'en fut pas moins traîné par les rues et attaché au gibet de
Paris.

292: Les colléges de Marmoutier, d'Arras, des Lombards, de Tours,


de Lisieux, de Bourgogne, d'Autun, de l'Ave-Maria, le collége Mignon,
ceux de Saint-Michel, de Cambrai, de Boncours, de Justice, des
Allemands et de Tournai.

293: Nos rois commençoient à user de ce droit suprême sur les


grands vassaux; et peu de temps après Jean fit décapiter, dans
l'hôtel de Nesle, le comte d'Eu et de Guines, connétable de France,
accusé et convaincu de haute trahison; mais, dans cette dernière
exécution, du moins les formalités nécessaires furent remplies.

294: Il y avoit déjà eu plusieurs maladies contagieuses à Paris sous


les règnes précédents; mais celle-ci, qui désola en même temps
toute la France, fut la plus terrible qui eût encore exercé ses ravages
dans cette capitale. Elle enleva plusieurs personnes de la famille
royale: Jeanne de Navarre, fille de Louis X; Bonne de Luxembourg,
femme du duc de Normandie; la reine Jeanne de Bourgogne, femme
de Philippe de Valois. Il mouroit à l'Hôtel-Dieu jusqu'à cinq cents
personnes par jour; on renouvela par trois fois la communauté des
sœurs qui servoient les malades, et qui périrent toutes victimes de
leur zèle. Des quartiers entiers devinrent déserts; et le cimetière des
Innocents se trouva tellement comblé de cadavres, qu'on se vit forcé
de le fermer, et d'en bénir un autre hors de la ville.
295: C'étoit une imposition sur diverses marchandises; mais le roi
reconnut que cet octroi étoit gratuit de la part de la ville, et ne
portoit aucun préjudice à ses priviléges et franchises.

296: Il fit défendre de nourrir des pourceaux dans l'enceinte de la


ville, sous peine de dix sous d'amende pour chaque pourceau, et
permit au premier qui les rencontreroit de les tuer. Il étoit aussi
défendu de balayer les rues dans les grandes pluies, pour ne pas
charger la rivière des immondices, qui devoient être emportées dans
des tombereaux.

297: Saint-Foix.

298: Ibid.

299: Dubreul, Malingre, Belleforêt.

300: Elle étoit écrite en petit gothique, et placée entre les deux
statues: l'abbé Lebeuf ne lui donne que deux à trois cents ans.

301: Quartier du Louvre, p. 25.

302: Depuis, l'abbaye Saint-Germain-des-Prés: le corps du saint


étoit dans la petite chapelle Saint-Symphorien, qui faisoit partie de
cette basilique.

303: Voici les termes de cet acte:


Basilicæ domni ac peculiaris patrini mei Germani episcopi qui me dulcissimè enutrivit, et suâ
sanctâ oratione, ac si indignum, ad sacerdotii honorem perduxit, si SUPERSISTIT in basilicâ
domni Vincentii, ubi sanctum ejus corpusculum requiescit, dono inibi in honore sepulturæ
suæ, villam Bobanæ quæ est in territorio Stampense super fluvio Colla, quam mihi gloriosus
domnus Chlotarius rex suo munere contulit: quod jubeo eâ conditione ut si sanctum corpus
ejus IN BASILICA NOVA quam inclitus Chilpericus quondàm rex construxit, si convenerit, ut
inibi transferatur, villa ipsa, ubi semper ejus corpus fuerit, semper ibi deserviat, et ipse
sanctus pontifex pro meis facinoribus deprecari dignetur...... Die VI kal. aprilis, anno XXII
regnantis gloriosissimi domni Chlotarii regis. (Corvaisier—Hist. des évêques du Mans, p.
194.)
304: Cette relique étoit une portion de ses vêtements. Elle existoit
encore dans le trésor de Notre-Dame en 1787.

305: S. Germani Rotundi.

306: Les évêques de Paris possédoient, dans les environs de cette


église, une grande étendue de terres labourables et de prairies, dont
les démembrements ont formé plusieurs paroisses et les quartiers
les plus populeux de Paris.

307: Duchesne, t. IV, p. 77.

308: Le nom de monastère s'est conservé long-temps pour les


paroisses, dans le vieux mot montier et moutier: mener la mariée au
moutier. Dans la chronique de Cambrai, que cite l'abbé Lebeuf, la
cathédrale d'Arras est appelée monasterium S. Mariæ Atrebatensis.

309: Cart. S. Germ. Autiss., fol. 18, verso.

310: Lebeuf, Hist. du Dioc. de Par., t. I, p. 49.

311: À commencer au Grand-Châtelet inclusivement, et suivant la


grande chaussée de Saint-Denis, pour ne se terminer que vers Saint-
Cloud, dont Chaillot seul se trouvoit excepté. (Lebeuf, ibid.)

312: Il y avoit eu anciennement beaucoup de fondations de


chapelles qui n'existoient plus dans le quatorzième siècle; et les plus
anciennes de ce temps-là ne passoient pas le quinzième. L'abbé
Lebeuf y compte une chapelle de Saint-Nicolas, dans la nef, établie
dès l'an 1189; en 1317, une chapelle de Sainte-Madeleine; en 1328,
une chapelle de la Trinité, fondée par Guillaume Des Essarts.
Plusieurs chapellenies se trouvoient déjà établies en 1497, à l'autel
des Cinq-Saints, situé dans la nef, etc., etc. (Le même, ibid., p. 50.)

313: Voy. pl. 47. La situation de ce portail, placé intérieurement, et


précédé d'un vestibule, est cause sans doute que les figures dont il
est orné ont échappé aux dévastations des brigands
révolutionnaires. Elles sont au nombre de six, et représentent les
deux personnes royales dont nous avons déjà parlé, un
ecclésiastique orné d'une simple dalmatique, qu'on croit être le saint
diacre Vulfran; sainte Geneviève, un ange et un évêque, que l'abbé
Lebeuf dit être saint Landri. Le peuple de Paris s'imagine y voir la
représentation de saint Germain; mais c'est une erreur: la statue de
saint Germain étoit au trumeau qui séparoit les deux battants de la
porte; elle en fut ôtée dans le dix-septième siècle, avec le pilier qui
embarrassoit l'entrée, et enfouie en terre sous la première arcade du
bas-côté, à droite. (Lebeuf, ibid., p. 42.)

314: Voyez pl. 35.

315: V. pl. 36. Le clocher, dont on a abattu la partie pyramidale,


étoit d'un gothique qui annonçoit le douzième siècle. Sa situation
singulière au côté méridional de l'entrée du chœur porte à penser
qu'il y en avoit un autre au côté septentrional, pour établir un ordre
symétrique, comme on le remarque dans un grand nombre d'églises.

316: Architecte de la partie du Louvre bâtie sous François Ier. Nous


aurons bientôt occasion d'en reparler.

La construction de ce jubé fut accompagnée de riches


embellissements faits intérieurement à cette église depuis 1607
jusqu'à 1623, en menuiserie, peintures, bronzes, marbres précieux
et dorures. Toutes les voûtes furent peintes d'azur, semé de fleurs de
lis d'or. Le grand autel surtout étoit d'une magnificence remarquable,
orné de six colonnes de porphyre, enceint d'une balustrade de
marbre blanc, etc.

317: Dans le temps que cette église étoit collégiale, l'office


paroissial se célébroit dans une chapelle de la nef, que l'on appeloit
chapelle de la paroisse.

318: Nom qu'on donne, dans la décoration d'architecture, à une


partie unie, simple, de diverses figures, et ordinairement carrée-
longue.

319: C'est ainsi qu'on nomme les montants et traverses de bois, de


pierre ou de fer qui séparent les guichets d'une croisée.

320: On prétend que François Ier, vivement frappé des beautés de


l'original peint à fresque dans le réfectoire des Dominicains de Milan,
voulut le faire transporter en France, avec le mur sur lequel il étoit
peint, mais qu'ayant reconnu l'impossibilité de l'exécution d'un tel
projet, il en fit faire plusieurs copies, au nombre desquelles étoit
celle-ci. Si le fait est vrai, on ne sauroit assez regretter ce morceau,
d'autant plus précieux que l'original est dans un état de dégradation
qui augmente tous les jours, et qu'on dit irréparable.

321: Le mausolée de ces deux personnages offre leurs figures en


albâtre, étendues sur une tombe de marbre noir, les mains jointes et
la tête appuyée sur un coussin; l'homme en habit de guerre, la
femme vêtue suivant la mode du temps. Un lion est couché à leurs
pieds. (Il avoit été déposé au musée des Petits-Augustins.)

Nous ne croyons pas qu'aucun historien de Paris ait parlé de ce


monument, qui cependant est en ce genre l'un des plus
remarquables de cette capitale. Il n'est point de sculpture moderne
exécutée avec un sentiment plus délicat, un fini plus précieux, une
plus grande vérité d'imitation. Les draperies, jetées avec toute
l'élégance que pouvoit permettre un semblable costume, sont d'une
souplesse qui le dispute aux ouvrages des plus grands maîtres du
seizième siècle. On ignore l'auteur de ce chef-d'œuvre qui nous
retrace le style de Germain Pilon dans son meilleur temps.

Le soubassement est couvert d'ornements d'une exécution très-


soignée, et enrichi de cinq petites statues représentant la Vierge,
des Saints, des Vertus caractérisées par leurs attributs. Ces divers
morceaux paroissent sortir de la même main, et ne sont point
indignes de ces deux excellentes figures.
322: Ce monument avoit été déposé au musée des Petits-Augustins.

323: Déposé dans le même musée.

324: On voit que cette paroisse s'étendoit jusque dans le quartier


Sainte-Opportune, et même dans les rues environnantes de cette
dernière église, dont les droits curiaux étoient extrêmement
circonscrits. Elle n'avoit sous sa juridiction que trente à quarante
maisons comprises dans les rues de la Tabletterie et des Fourreurs,
de plus, les maisons du cloître et de la place, celles de la rue de
l'Aiguillerie, quelques-unes au coin de la rue Saint-Denis, et la rue
Courtalon.

325: Une partie de cette forêt subsistoit encore du temps de saint


Louis, qui, au rapport des historiens, fit construire l'hôpital des
Quinze-Vingts in luco (dans le bois). Elle se confondoit alors avec la
forêt de Saint-Germain-en-Laye.

326: Histoire de l'université de Paris.

327: Ces domaines, dispersés dans le royaume, et au nombre de


cent soixante (Voy. p. 81, 1re partie.), composoient le principal
revenu de nos rois de la première et de la seconde race. Ce n'étoient
point des maisons de plaisance avec de vastes jardins embellis par
l'art; c'étoient de bonnes métairies, ordinairement au milieu des
forêts. On y tenoit des haras; on y nourrissoit des bœufs, des
vaches, des moutons, de la volaille. On vendoit au profit du roi les
provisions qu'il n'avoit pas consommées. Voy. p. 677.

328: Duch., t. V, p. 63.

329: On sait que l'évêque et le chapitre de Paris avoient aussi des


droits sur une partie du terrain du Louvre. Dix-huit ans après, en
1222, ce même prince chargea la prévôté de Paris du paiement
d'une rente de 20 liv. parisis à ce prélat et à son église, à cause des
Halles, du Petit Châtelet et même de la plus grande partie du
Louvre, bâtis dans leur seigneurie.
330: Ici Sauval dit que les tours des portaux ne s'élevoient que
jusqu'au premier étage. Il confond évidemment les tours de
l'enceinte avec celles qui flanquoient le corps-de-logis; et il suffit de
jeter les yeux sur la gravure que nous en donnons pour s'en
convaincre. Voy. pl. 37.

On voyoit autrefois dans la sacristie de l'abbaye Saint-Germain-des-


Prés un ancien tableau qui paroissoit avoir été peint au
commencement du quinzième siècle. Il représente un saint abbé de
ce monastère, nommé Guillaume, à genoux, et soutenant un Christ
détaché de la croix; à l'article où nous parlerons de cette célèbre
abbaye, nous aurons occasion de revenir sur ce tableau,
extrêmement curieux sous plusieurs rapports, mais principalement
par la composition du fond sur lequel se détachent les figures. Ce
fond représente l'abbaye au milieu de ses prés, environnée de tours
rondes, de hautes murailles et de fossés profonds. Le Louvre, avec
ses grosses tours, y paroît aussi de l'autre côté de la rivière, tel qu'il
avoit été construit par Philippe-Auguste. À côté est le Petit-Bourbon,
dont a pu voir encore des débris dans le siècle dernier; et plus loin,
la butte Montmartre avec le monastère de religieuses que la reine
Adélaïde de Savoie y avoit fait bâtir. C'est d'après ce tableau, seul
monument qui nous ait laissé une représentation de ces édifices,
que cette gravure a été fidèlement copiée. (Il avoit été déposé au
musée des Petits-Augustins.)

331: Les registres et les titres de la chambre des comptes sont


pleins d'assignations de deniers, que nos rois donnaient aux grands
seigneurs sur la tour du Louvre. Louis VIII, qui pendant son règne
avoit amassé des sommes immenses en masse et en espèces, les fit
porter dans cette tour, et non dans celle du Temple, qui avoit jusque
là servi de trésor à ses prédécesseurs. François Ier l'ayant fait abattre
deux ans et demi après, le coffre du Louvre ou de l'épargne lui
succéda, et servit à la garde du trésor royal, suivant le registre des
ordonnances du parlement.
332: Sur le pignon du pont-levis étoit la figure de Charles V tenant
un sceptre, sculptée par Jean de Saint-Romain, pour le prix de 6 liv.
8 sous parisis.

333: Quoique cette tour servît de prison, nous apprenons des


registres de la chambre des comptes que Charles V y demeuroit en
1398, et qu'il fit fermer de fil d'archal les fenêtres de son
appartement, parce qu'il se trouvoit incommodé des oiseaux et des
pigeons qui y entroient sans cesse. On croit même qu'il n'est pas le
seul de nos rois qui en ait fait sa demeure. Du reste, le peuple, avide
de tous les bruits qui frappent son imagination, contoit quantité de
fables de cette tour; et c'étoit une tradition, qu'il y existoit des
souterrains où l'on se défaisoit des criminels qu'on ne vouloit pas
faire mourir en public.

334: Selon un catalogue de cette bibliothèque, il y avoit 269


volumes dans la première chambre, 260 dans la chambre du milieu,
et 380 dans la chambre du troisième étage.

335: Ces fossés étoient très-poissonneux; et il est dit que l'an 1415,
le 3 février, on en leva les bondes, pour donner de l'air au poisson,
qui étoit enseveli sous la glace.

336: Henricus II, christianissimus, vetustate collapsum refici


cœptum à patre Francisco I, rege christianissimo, mortui sanctissimi
parentis piissimus filius absolvit, anno à salute Christi M. D.
XXXXVIII.

337: Voy. pl. 39. Depuis la nouvelle restauration, il ne reste plus


d'intègre dans cette partie que la moitié de l'aile qui s'étend depuis
l'angle jusqu'au gros pavillon du milieu; l'autre portion a été démolie
dans sa partie supérieure, et reconstruite dans l'ordonnance des
autres façades intérieures. Avant, elle étoit ornée de frontons
comme le Vieux-Louvre.

338: Cet homme célèbre remplit Paris de monuments qui sont tous
autant de chefs-d'œuvre. Tout le monde connoît sa fin tragique. Il
fut tué le jour de la Saint-Barthélemi, lorsqu'il s'occupoit à retoucher
la sculpture de la fontaine des Innocents, qui depuis long-temps
étoit achevée.

339: Cette salle, lorsque nos rois cessèrent d'habiter le Louvre,


devint un dépôt des statues antiques et des plâtres qui servoient aux
études des artistes. Elle prit alors le nom de salle des Antiques.
Depuis, les quatre classes qui composent l'Institut y ont tenu leurs
séances.

340: Voy. pl. 39. Ce grand artiste, qui passa presque toute sa vie à
Rome, n'étoit point alors à Paris; et ces figures furent exécutées sur
les modèles qu'il envoya.

341: Voyez pl. 47.

342: Voyez pl. 38.

343: Voy. pl. 43. La façade du côté du quai étoit masquée par une
autre façade élevée depuis par Perrault; et les artistes d'un goût
délicat la préféroient à cette dernière.

344: Voy. pl. 40.

345: Des officiers envoyés par la cour lui apprêtoient à manger sur
la route; il étoit complimenté et recevoit des présents dans toutes
les villes où il passoit. Quand il approcha de Paris, on envoya au-
devant de lui M. de Chantelou, maître-d'hôtel du roi, qui savoit
l'italien, et qui, par cette raison, eut ordre de l'accompagner pendant
tout son séjour dans cette capitale.

346: Le portrait qu'en a tracé Claude Perrault peut passer pour vrai,
quoiqu'il sorte d'une main ennemie, parce qu'il s'accorde assez avec
ce qu'en dit M. de Chantelou, qui en parle avec une entière
impartialité; le voici:
«Il avoit une taille un peu au-dessous de la médiocre, bonne mine,
un air hardi. Son âge avancé et sa bonne réputation lui donnoient
encore beaucoup de confiance. Il avoit l'esprit vif et brillant, et un
grand talent pour se faire valoir: beau parleur, tout plein de
sentences, de paraboles, d'historiettes et de bons mots dont il
assaisonnoit la plupart de ses réponses........ Il ne louoit et ne prisoit
guère que les hommes et les ouvrages de son pays. Il citoit souvent
Michel-Ange; et on l'entendoit presque toujours dire: Sicome diceva
il Michel-Angelo Buonarotta.»

347: Voy. pl. 41. Le roi en posa la première pierre avec un grand
éclat. La médaille qu'on y plaça étoit d'or, et de la valeur de 2,400
liv. Elle représentoit d'un côté la tête de Louis XIV, et de l'autre le
dessin du cavalier Bernin, avec ces paroles: Majestati et æternitati
imperii Gallici sacrum. La médaille étoit du célèbre Warin, et
l'inscription de Chapelain.

348: T. I, vie du Bernin.

349: Patte, dans ses Mémoires sur l'architecture, porte à peu près le
même jugement de ce projet. Presque tous les artistes qui en ont
parlé sont d'avis que c'est une composition médiocre: cependant
aujourd'hui que le goût de l'architecture est changé en France, il est
probable qu'on le jugeroit plus favorablement; et l'on ne peut nier
que les lignes qu'il présente n'aient plus de grandeur, et ne soient
conçues dans un style plus pur que la colonnade actuelle.

350: Ceci arriva après que le Bernin eut quitté la France. Il n'avoit
point vu ce projet; et si l'on ne savoit d'ailleurs la haine qui existoit
entre lui et les Perrault, cette circonstance suffiroit seule pour
détruire entièrement la petite anecdote qu'on a tant répétée de son
admiration pour le dessin de la colonnade, anecdote que Voltaire a
dite d'abord en prose, et ensuite en vers:

«À la voix de Colbert Bernini vint de Rome:


De Perrault dans le Louvre il admira la main.
Ah! dit-il, si Paris renferme dans son sein
Des travaux si parfaits, un si rare génie,
Falloit-il m'appeler du fond de l'Italie?»

Si le Bernin a jamais exprimé sa façon de penser sur Perrault, il a


certainement dit à peu près le contraire de ce qu'on lui fait dire ici.

351: Voy. pl. 42.

352: On lui reproche de n'être qu'une décoration théâtrale, sans


liaison entre ses parties ni avec l'édifice, qu'elle ne sert qu'à
masquer; on critique l'innovation des colonnes accouplées, qui
n'offre, dit-on, aucun résultat avantageux; et l'on prétend qu'avec
des colonnes solitaires, même d'un diamètre égal à celles qu'il a
employées, l'architecte eût donné plus de majesté à sa façade, sans
priver de lumière l'intérieur du péristyle. Mais ce que l'on blâme
surtout universellement, c'est cet avant-corps du milieu qui
interrompt la colonnade, et en forme deux péristyles séparés. Par là
le monument perd la moitié de sa noblesse et de sa grandeur.

353: Voy. pl. 44. C'est cette façade qui masque celle de Levau, déjà
existante, et dont nous venons de parler.

354: Voy. pl. 43.

355: Pour les trois façades intérieures du Louvre qui se composent


des trois ordres, Voyez la pl. 45; et pour les vestibules ou entrées, la
pl. 46.

356: Voyez à la fin de ce quartier l'article Monuments nouveaux.

357: Voyez p. 275, 1re partie.

358: On sera peut-être curieux d'avoir ici un détail circonstancié des


formalités qui s'observoient en pareille circonstance, pour donner
une sanction entière à de semblables établissements. Sur le
consentement de l'évêque, du 15 octobre 1612, ces lettres-patentes
furent enregistrées au parlement le 4 septembre d'après; l'année
suivante, le pape Paul V l'autorisa par une bulle du 6 des ides de mai
(le 10) 1613; et en conséquence des lettres de relief adressées à la
cour des aides le 16 décembre 1618, celles de 1611 y furent
enregistrées le 18 février 1619, et à la chambre des comptes le 10
avril 1629, en exécution de semblables lettres qui leur avoient été
adressées au mois de janvier précédent.

359: Voyez pl. 47.

360: Sur un mausolée de marbre noir, le cardinal[360-A] est


représenté à genoux, ayant devant lui un livre ouvert que lui
présente un ange. Ce mausolée, remarquable parmi les monuments
de la sculpture française, est de François Anguier. (Déposé pendant
la révolution au musée des Petits-Augustins.)

360-A: Ce prélat, digne des anciens temps, mourut en disant la


messe, et au moment qu'il prononçoit ces mots du canon: hanc
igitur oblationem; il fut ainsi lui-même la victime du sacrifice qu'il
n'eut pas le temps d'achever. Cette circonstance est rappelée dans
son épitaphe, et exprimée dans le distique suivant:

Cœpta sub extremis nequeo dùm sacra sacerdos


Perficere, at saltem victima perficiam.

361: L'église de l'Oratoire a été concédée à des protestants qui y


célèbrent leur culte; on a placé dans les bâtiments de la
communauté les bureaux de la caisse d'amortissement.

362: Cart. S. Germ. Autiss., fol. 46.

363: Ibid.—et Dubreul, p. 802.

364: Hist. S. Mart. de Campis, p. 200.

365: Hist. de Par., t. V, p. 602.


366: Huit sacerdotales, deux diaconales et deux sous-diaconales.
(Petit Pastor., fol. 86.)

367: Hist. de Par., t. III, p. 77.

368: Voyez p. 361, 1re partie.

369: Ce clocher fut élevé vers l'an 1300, et l'abbé Lebeuf a trouvé
dans un acte de 1424 que le chapitre acquit, moyennant seize sous
de rente, un petit terrain dans la justice de l'évêque, et faisant le
coin de la rue des Petits-Champs, pour y construire le portail. C'étoit
ainsi que la plupart des anciennes églises se formoient de parties
incohérentes, élevées successivement à de longs intervalles, ce qui
d'ailleurs ne répugnoit point au système de l'architecture gothique.
La représentation que nous donnons de celle-ci doit paroître d'autant
plus curieuse qu'elle provient d'un dessin original, lequel est unique,
et n'a jamais été gravé. (Voy. pl. 47.) Il ne reste plus d'autre vestige
de cette église, qu'une petite portion du mur du portail; le reste a
été remplacé par des maisons; et le cloître est devenu un passage
qui donne de la rue des Bons-Enfants dans la rue Croix-des-Petits-
Champs, et que croisent deux autres passages aboutissant à la rue
Saint-Honoré et à la nouvelle rue de Montesquieu.

370: Sur son tombeau, déposé pendant la révolution au musée des


Petits-Augustins, cet homme trop fameux est représenté à genoux
devant un prie-Dieu, sur lequel est posé le livre des psaumes ouvert
à ces mots: miserere mei Deus, etc. Cette figure est de Coustou,
habile sculpteur du siècle dernier; et l'on prétend qu'il y a
parfaitement saisi les traits et la physionomie du ministre. Il l'a
représenté la tête et les yeux tournés vers l'épaule gauche, du côté
du peuple, et la légère altération qu'il a mise dans ses traits semble
indiquer le repentir. Il n'y a pas moins d'adresse et de circonspection
dans l'épitaphe qui étoit encore plus difficile à traiter que la figure.
Elle est de M. Couture, recteur de l'université de Paris, et mérite
d'être citée:
D. O. M.
AD ARAM MAJOREM.

In communi Canonicorum sepulcreto situs est Guillelmus Dubois, S. R.


E. cardinalis, archiepiscopus et dux Cameracencis, S. Imperii
princeps, regi à secretioribus consiliis, mandatis et legationibus,
publicorum cursorum præfectus, primus regni administer, hujus
Ecclesiæ canonicus honorarius. Quid autem hi tituli? nisi arcus
coloratus, et fumus ad modicum pariens. Viator, stabiliora
solidioraque bona mortuo apprecare. Obiit anno 1723. Hœredes grati
erga regem et summum pontificem animi monumentum posuêre.

371: Elle fut ouverte en 1583.

372: Arch. S. Germ. Autiss., reg. 1, fol. 70.

373: Arch. de l'archev.

374: Elles n'avoient pas sans doute dix toises chacune; car tout
l'emplacement du Petit-Bourbon n'en contenoit guère plus de deux
mille huit cents. (Jaillot.)

375: Il avoit été en partie démoli en 1527, à l'occasion de la révolte


et de l'évasion du fameux connétable de Bourbon. On sema du sel
sur le sol qu'il occupoit; les armoiries du coupable y furent brisées,
et le bourreau barbouilla les fenêtres et les portes qui restoient
encore, de ce jaune infamant dont on barbouilloit les maisons des
traîtres, et notamment des criminels de lèse-majesté.

376: On la nommoit aussi rue du Louvre.

377: Sauval, qui cite pour garant un registre de l'hôtel-de-ville (t. I,


p. 27 et 431; t. II, p. 237 et 260), prétend que ce fut dans cet hôtel
que Henri IV fut blessé par Jean Châtel. Le chancelier de Chiverni
dit, dans ses mémoires, que ce malheur arriva dans l'hôtel de
Schomberg, depuis l'hôtel d'Aligre. D'autres historiens avancent que
ce fut au Louvre.
378: En 1281.

379: Ce fut dans cet hôtel de Retz que fut conduit l'exécrable
Ravaillac après son attentat.

380: Entre autres par l'hôtel d'Angeviller.

381: Elle a été depuis abattue, ainsi que plusieurs maisons de la rue
du Petit-Bourbon, contiguë à ce passage, pour former une place
devant l'église.

382: On avoit déjà parlé de marier Henri IV avec Marie de Médicis;


et comme Zamet étoit né sujet du duc de Florence, ses ennemis le
soupçonnèrent d'un crime dont il n'y eut toutefois aucune preuve.

383: Dans cette maison du Doyenné qu'elle occupoit, sans doute


pour être à la proximité du Louvre et de sa tante la marquise de
Sourdis, dont l'hôtel étoit situé dans un cul-de-sac, rue des Fossés-
Saint-Germain.

384: Sauval assure avoir connu des vieillards qui lui avoient dit
qu'après sa mort on l'exposa dans la grand'salle de sa maison;
qu'elle étoit vêtue d'une robe de satin blanc, et couchée sur un lit de
parade de velours cramoisi, enrichi de dentelles d'or et d'argent.

Saint-Foix dit qu'il n'est pas vraisemblable qu'on ait exposé à la vue
du public une personne à qui des symptômes terribles de mort
avoient défiguré tous les traits et tourné la bouche jusque derrière le
cou.

385: Il est remarquable que la première fontaine qui fut élevée dans
la Cité étoit alimentée par les eaux de l'aquéduc Saint-Gervais. Ce
fut en 1605 et sur l'emplacement de la maison du père de Jean-
Châtel, que le prévôt des marchands Miron la fit construire, après
qu'on eut abattu la pyramide infamante qui d'abord avoit été bâtie
sur les ruines de cette maison. On y lisoit ce distique latin qui
rappeloit la mémoire de l'attentat du régicide, et de la destruction du
monument destiné à en éterniser le souvenir:

Hic, ubi restabant sacri monumenta furoris,


Eluit infandum Mironis unda scelus.

Peu d'années après, cette fontaine fut transférée dans la cour


méridionale du Palais de Justice, et elle y étoit déjà en 1724. Elle
existe encore sous le nom de fontaine Sainte-Anne, et reçoit de l'eau
de la pompe du pont Notre-Dame.

386: Pet. cart., fol. 163, c. 223.

387: Cens. de l'évêch., 1489.—Sauval, t. I, p. 109.

388: Il y a dans cette rue trois culs-de-sacs:

1o. Celui des Provençaux. Il doit son nom à une enseigne qui
subsistoit encore en 1772. On l'appeloit anciennement Arnoul de
Charonne, du nom d'un particulier qui y demeuroit en 1293. Depuis,
par altération, Raoul de Charonne et Arnoul le Charron. (Cart. S.
Germ. Autiss., fol. 38 et 39.—Cens. de l'év.)

2o. Celui de la Petite-Bastille. En 1499, il étoit cité sans nom dans les
censiers de l'évêché, sous la seule dénomination de Ruelle-sans-
bout. En 1540, on le trouve nommé Jean de Charonne. Enfin il a
reçu son dernier nom d'un cabaret qui en occupoit le fond.

3o. Le cul-de-sac de Court-Bâton[388-A]. Il formoit autrefois avec


celui de Sourdis une rue qui aboutissoit dans celle de l'Arbre-Sec et
sur le fossé. On la nommoit Chardeporc; et elle devoit ce nom à
Adam Chardeporc, qui, en 1251, possédoit plusieurs maisons sur le
fossé Saint-Germain. (Cart. S. Germ. Autiss., fol. 72.) Comme on
appeloit anciennement un porc bacco, et bacon quand il étoit salé,
on donna à cette rue le nom de Bacon, qu'elle portoit en 1340. (Reg.
1, fol. 13.) On voit cependant, par le dit de Guillot et le rôle de 1313,
que cette rue s'appeloit du Col-de-Bacon, vraisemblablement d'une
enseigne. Il fut ensuite changé, par altération, en Cop ou Coup-de-
Bâton; et c'est ainsi qu'elle est désignée dans la liste du quinzième
siècle. On a dit ensuite de Court-Bâton, du nom d'une maison qui
faisoit le coin de cette rue et de celle des Fossés. (Reg. des Ensaiss.
de l'archev., 1636)

388-A: Il est maintenant fermé d'une grille.

389: T. I, p. 243.

390: Arch. de N. D., compte de 1407.

391: Cette place devint un lieu de rassemblement. En 1505 il y


éclata une espèce de sédition, à l'occasion d'une marchande que le
curé, dit-on, ne vouloit pas enterrer, avant qu'on ne lui eût montré
si, dans son testament, il existoit un legs pour l'église; ce qui semble
bien incroyable. Sous Charles VI, il y avoit déjà eu au même endroit
une émeute, à laquelle l'excès des contributions avoit servi de
prétexte.

392: Voyez p. 837.

393: Cart. S. Germ. Autiss., fol. 27—verso et seq.

394: Cens. S. Germ. Autiss., an. 1554.

395: Hist. univ. Par., t. III, p. 459.—Arch. de l'archev.

396: La portion de cette rue qui étoit du côté de la vieille place du


Louvre a été abattue pour l'agrandir; cette place est nommée
maintenant place d'Austerlitz, et l'espace qui est devant la façade
latérale du palais, du côté de la rue du Coq, se nomme place de
Marengo.

397: Voyez p. 822. Elle fait maintenant partie de la place qui est
devant la colonnade, et qu'on nomme place d'Iéna.
398: Cart. S. Germ. Autiss., folio 28, verso.

399: Cart. S. Germ. Autiss., fol. 28, verso.

400: Arch. de l'archev.

401: Arch. de S. Germ. l'Auxer.

402: Cette rue est maintenant fermée du côté du cloître.

403: Cart. S. Germ. Autiss., fol. 14 et 61.

404: Ibid.

405: Ensaiss. de S. Germ., reg. 2, fol. 36 et 64.

406: Ensaiss. de S. Germ. Reg. 3, fol. 54. Devant cette place étoit
un port qui servoit d'arrivage aux marchandises, et de dépôt de
navigation. Avant la construction du pont Neuf, il y avoit sur cette
place, comme sur d'autres points des rivages de la Seine, un nombre
suffisant de bachoteurs ou passeurs d'eau pour la facilité des
communications.

407: Cart. S. Germ. Autiss., fol. 67 et 68.

408: Arch. de l'archev., et de S. Honoré.

409: Abb. v. 174 et seq.

410: Dans cette rue est un cul-de-sac appelé de Sourdis. Il doit ce


nom à un hôtel qui y subsistoit encore en 1772. Vis-à-vis ce cul-de-
sac étoit autrefois la poste aux chevaux.

411: On donnoit indifféremment à ces trois rues le nom de rues ou


ruelles du cloître, ruelle par laquelle on va à l'église, et y
aboutissant.
412: Il y a dans le cloître un cul-de-sac que l'on nommoit, au
quinzième siècle, rue de la Treille, ensuite, ruelle du Puits du
Chapitre. Un titre de 1271 la désigne sous le nom de ruella Guidonis
de Ham. Elle a repris le nom de cul-de-sac de la Treille.

413: Elle a pris ce nom de l'église qui étoit sous l'invocation de saint
Honoré, évêque d'Amiens.

414: Arch. du chap. de N. D.

415: On la nomme maintenant rue de la Bibliothèque.

416: Cart. S. Germ. Autiss., fol. 52, verso.

417: Arch. de l'archev.

418: Cart. de Sorb., fol. 145, verso.—Cart. épiscop. 1282.

419: Les anciens bâtiments qui subsistoient encore vers le milieu du


dernier siècle annonçoient le règne de saint Louis, ou celui de
Philippe-le-Hardi.

420: T. I, p. 159.

421: Cart. S. Germ. Autiss., fol. 52.

422: Germ. Brice, t. IV, p. 180.

423: Une des plus grandes effronteries de Buonaparte avoit été de


faire mettre son buste au milieu de tout ce magnifique appareil,
honneur insigne qu'il jugeoit lui être dû, pour avoir fait regratter
cette belle colonnade.

424: À la place de ce casque étoit encore un portrait de Buonaparte.

425: Le quartier des Halles.


426: Vis-à-vis la rue Royale, à l'endroit où commence aujourd'hui le
nouveau faubourg qui porte ce même nom de faubourg Saint-
Honoré.

427: Cet arrêt avoit pour fondement six motifs qui regardoient la
santé, la subsistance et la sûreté des citoyens. «Le premier, que la
ville de Paris, portée à une grandeur excessive, seroit plus
susceptible de mauvais air; le second, que cela rendroit le
nettoiement de ses immondices beaucoup plus difficile; le troisième,
que l'augmentation du nombre des habitants augmenteroit à
proportion le prix des vivres et autres denrées, ouvrages et autres
marchandises; le quatrième, que l'on avoit depuis couvert de
bâtiments les terres qui avoient autrefois servi d'agriculture pour les
légumes et les menus fruits nécessaires aux provisions de la ville: ce
qui en causeroit immanquablement la disette si l'on continuoit d'y
bâtir; le cinquième que les habitants des bourgs et des villages
voisins, attirés par les prérogatives des faubourgs de cette capitale,
venoient s'y habituer en si grand nombre, que, si cela continuoit, la
campagne deviendroit déserte; le sixième enfin, que la difficulté de
gouverner un si grand peuple donnoit lieu au déréglement de la
police et aux meurtres, vols et larcins qui se commettoient
fréquemment et impunément, de jour et de nuit, en cette ville et ses
faubourgs.»

Cependant l'on bâtit encore depuis, et hors des bornes qui avoient
été plantées en 1638; ce qui provoqua, en 1672, un nouvel arrêt,
qui ordonnoit qu'il seroit planté de nouvelles bornes aux extrémités
des faubourgs pour en marquer l'enceinte, et faisoit de très-
expresses défenses de les passer à l'avenir par aucun bâtiment.
(Delamare.)

428: On en trouvera plus loin la preuve.

429: Recherch. sur Par., quart. du Palais-Roy., p. 77.

430: Hist. eccles. Par., t. II, p. 182.


Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like