-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME.txt
188 lines (179 loc) · 4.89 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
Programming in Python 3
A Complete Introduction to the Python Language---second edition
by Mark Summerfield
ISBN: 978-0-13-712929-9
All the example programs and modules are copyright (c) Qtrac Ltd. 2008-9.
They are free software: you can redistribute them and/or modify them
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version version 3 of the License, or
(at your option) any later version. They are provided for educational
purposes and are distributed in the hope that they will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public Licenses (in file gpl-3.0.txt) for more details.
All the book's examples are designed to be educational, and many are
also designed to be useful. I hope that you find them helpful, and are
perhaps able to use some of them as starting points for your own
projects.
Most of the icons are from KDE (The `K' Desktop Environment), and come
under KDE's LGPL license. (Visit http:///www.kde.org for more information.)
Here is the list of programs referred to in the book grouped by chapter.
In addition the data and images subdirectories contain the sample data
and images that some of the programs use.
Note that these examples are for any Python 3.x version. (A separate set
of examples for Python 3.1 or later are available from
www.qtrac.eu/py3book.html.)
Chapter 1:
average1_ans.py
average2_ans.py
awfulpoetry1_ans.py
awfulpoetry2_ans.py
bigdigits.py
bigdigits_ans.py
echoargs.py
generate_grid.py
hello.py
sum1.py
sum2.py
Chapter 2:
csv2html.py
csv2html1_ans.py
csv2html2_ans.py
print_unicode.py
print_unicode_ans.py
print_unicode_uni.py
print_unicode_uni_ans.py
quadratic.py
quadratic_ans.py
quadratic_uni.py
quadratic_uni_ans.py
Chapter 3:
external_sites.py
external_sites_ans.py
generate_test_names1.py
generate_test_names2.py
generate_usernames.py
generate_usernames_ans.py
grepword.py
statistics.py
uniquewords1.py
uniquewords2.py
uniquewords_ans.py
Chapter 4:
checktags.py
digit_names.py
listkeeper.py
make_html_skeleton.py
noblanks.py
TextUtil.py
Util.py
Chapter 5:
base64image.py
capture.py
CharGrid.py
convert-incidents.py
csv2html2_opt.py
finddup.py
Graphics/__init__.py
Graphics/Bmp.py
Graphics/Jpeg.py
Graphics/Png.py
Graphics/Tiff.py
Graphics/Vector/__init__.py
Graphics/Vector/Eps.py
Graphics/Vector/Svg.py
Graphics/Xpm.py
ls.py
untar.py
Chapter 6:
Account.py
Circle.py
FuzzyBool.py
FuzzyBoolAlt.py
Image.py
Image_ans.py
Shape.py
Shape_ans.py
ShapeAlt.py
ShapeAlt_ans.py
SortedDict.py
SortedList.py # See bug fix note at the end
Chapter 7:
BikeStock.py
BikeStock_ans.py
BinaryRecordFile.py
BinaryRecordFile_ans.py
convert-incidents.py
xdump.py
Chapter 8:
Abstract.py
Appliance.py
Ascii.py
Atomic.py
Const.py
ExternalStorage.py
IndentedList.py
magic-numbers.py
magic-numbers_ans.py
Meta.py
Property.py
SortedListAbc.py
SortedListDelegate.py
SortedListMeta.py
SortKey.py
TextFilter.py
Valid.py
XmlShadow.py
find.py
Chapter 9:
findduplicates-t.py
findduplicates-t2.py # This has slightly improved logic over the version shown in the book
findduplicates-m.py
grepword-m.py
grepword-p-child.py
grepword-p.py
grepword-p_ans.py
grepword-t.py
xmlsummary.py
Chapter 10:
car_registration.py
car_registration_ans.py
car_registration_server.py
car_registration_server_ans.py
Chapter 11:
bookmarks.py
dvds-dbm.py
dvds-sql.py
Chapter 12:
test_blocks.py
test_Atomic.py
test_Modules.py
Chapter 13:
extract_tags.py
html2text.py
phone.py
Chapter 14:
playlist.py (ReadKeyValue.py, ReadM3U.py)
blocks.py (Block.py, BlockOutput.py)
first-order-logic.py
BibTeX.py
Chapter 15:
bookmarks-tk.pyw
bookmarks-tk_ans.pyw
interest-tk.pyw
regex-tk.pyw
NOTE: Util.py now has an improved equal_float() function with a slightly
different API. (An improved version of the old version is in the module
under the name equal_float_old().)
BUG FIX: Khan Fusion pointed out a subtle bug in the SortedList*.py
modules that caused incorrect behavior when the keys are strings and the
key function is
lambda x: x.lower()
or
lambda x: x.upper()
The bug has been fixed in all versions: however this means that the code
in the book is a bit different in places from that in this archive for
these modules. The fundamental algorithms used haven't changed, it is
just that the code now works correctly when there are multiple items
whose keys are the same even though their values are different.
(See the new doctests to see examples.)