Introduction |
|
xxxi | |
Acknowledgments |
|
xxxiii | |
About the Author |
|
xxxv | |
Chapter 1 Text |
|
1 | (64) |
|
1.1 string: Text Constants and Templates |
|
|
1 | (6) |
|
|
1 | (1) |
|
|
2 | (2) |
|
|
4 | (2) |
|
|
6 | (1) |
|
|
6 | (1) |
|
1.2 textwrap: Formatting Text Paragraphs |
|
|
7 | (6) |
|
|
8 | (1) |
|
|
8 | (1) |
|
1.2.3 Removing Existing Indentation |
|
|
8 | (1) |
|
1.2.4 Combining Dedent and Fill |
|
|
9 | (1) |
|
|
10 | (2) |
|
|
12 | (1) |
|
1.2.7 Truncating Long Text |
|
|
12 | (1) |
|
1.3 re: Regular Expressions |
|
|
13 | (45) |
|
1.3.1 Finding Patterns in Text |
|
|
14 | (1) |
|
1.3.2 Compiling Expressions |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (11) |
|
1.3.5 Constraining the Search |
|
|
28 | (2) |
|
1.3.6 Dissecting Matches with Groups |
|
|
30 | (6) |
|
|
36 | (8) |
|
1.3.8 Looking Ahead or Behind |
|
|
44 | (4) |
|
1.3.9 Self-referencing Expressions |
|
|
48 | (5) |
|
1.3.10 Modifying Strings with Patterns |
|
|
53 | (2) |
|
1.3.11 Splitting with Patterns |
|
|
55 | (3) |
|
1.4 difflib: Compare Sequences |
|
|
58 | (7) |
|
1.4.1 Comparing Bodies of Text |
|
|
58 | (3) |
|
|
61 | (1) |
|
1.4.3 Comparing Arbitrary Types |
|
|
62 | (3) |
Chapter 2 Data Structures |
|
65 | (78) |
|
2.1 enum: Enumeration Type |
|
|
66 | (9) |
|
2.1.1 Creating Enumerations |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (2) |
|
2.1.4 Unique Enumeration Values |
|
|
69 | (2) |
|
2.1.5 Creating Enumerations Programmatically |
|
|
71 | (1) |
|
2.1.6 Non-integer Member Values |
|
|
72 | (3) |
|
2.2 collections: Container Data Types |
|
|
75 | (23) |
|
2.2.1 ChainMap: Search Multiple Dictionaries |
|
|
75 | (4) |
|
2.2.2 Counter: Count Hashable Objects |
|
|
79 | (4) |
|
2.2.3 defaultdict: Missing Keys Return a Default Value |
|
|
83 | (1) |
|
2.2.4 deque: Double-Ended Queue |
|
|
84 | (5) |
|
2.2.5 namedtuple: Tuple Subclass with Named Fields |
|
|
89 | (5) |
|
2.2.6 OrderedDict: Remember the Order Keys Are Added to a Dictionary |
|
|
94 | (3) |
|
2.2.7 collections.abc: Abstract Base Classes for Containers |
|
|
97 | (1) |
|
2.3 array: Sequence of Fixed-Type Data |
|
|
98 | (5) |
|
|
98 | (1) |
|
2.3.2 Manipulating Arrays |
|
|
99 | (1) |
|
|
100 | (1) |
|
2.3.4 Alternative Byte Ordering |
|
|
101 | (2) |
|
2.4 heapq: Heap Sort Algorithm |
|
|
103 | (6) |
|
|
103 | (1) |
|
|
104 | (1) |
|
2.4.3 Accessing the Contents of a Heap |
|
|
105 | (2) |
|
2.4.4 Data Extremes from a Heap |
|
|
107 | (1) |
|
2.4.5 Efficiently Merging Sorted Sequences |
|
|
108 | (1) |
|
2.5 bisect: Maintain Lists in Sorted Order |
|
|
109 | (2) |
|
2.5.1 Inserting in Sorted Order |
|
|
109 | (1) |
|
2.5.2 Handling Duplicates |
|
|
110 | (1) |
|
2.6 queue: Thread-Safe FIFO Implementation |
|
|
111 | (6) |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
113 | (1) |
|
2.6.4 Building a Threaded Podcast Client |
|
|
114 | (3) |
|
2.7 struct: Binary Data Structures |
|
|
117 | (4) |
|
2.7.1 Functions Versus Struct Class |
|
|
117 | (1) |
|
2.7.2 Packing and Unpacking |
|
|
117 | (1) |
|
|
118 | (2) |
|
|
120 | (1) |
|
2.8 weakref: Impermanent References to Objects |
|
|
121 | (9) |
|
|
122 | (1) |
|
2.8.2 Reference Callbacks |
|
|
122 | (1) |
|
|
123 | (3) |
|
|
126 | (1) |
|
|
127 | (3) |
|
2.9 copy: Duplicate Objects |
|
|
130 | (6) |
|
|
130 | (1) |
|
|
131 | (1) |
|
2.9.3 Customizing Copy Behavior |
|
|
132 | (1) |
|
2.9.4 Recursion in Deep Copy |
|
|
133 | (3) |
|
2.10 pprint: Pretty-Print Data Structures |
|
|
136 | (7) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
2.10.5 Limiting Nested Output |
|
|
139 | (1) |
|
2.10.6 Controlling Output Width |
|
|
140 | (3) |
Chapter 3 Algorithms |
|
143 | (68) |
|
3.1 functools: Tools for Manipulating Functions |
|
|
143 | (20) |
|
|
143 | (8) |
|
|
151 | (4) |
|
|
155 | (3) |
|
3.1.4 Reducing a Data Set |
|
|
158 | (3) |
|
|
161 | (2) |
|
3.2 itertools: Iterator Functions |
|
|
163 | (20) |
|
3.2.1 Merging and Splitting Iterators |
|
|
164 | (3) |
|
|
167 | (2) |
|
3.2.3 Producing New Values |
|
|
169 | (3) |
|
|
172 | (3) |
|
|
175 | (1) |
|
|
176 | (7) |
|
3.3 operator: Functional Interface to Built-in Operators |
|
|
183 | (8) |
|
|
183 | (1) |
|
3.3.2 Comparison Operators |
|
|
184 | (1) |
|
3.3.3 Arithmetic Operators |
|
|
184 | (2) |
|
|
186 | (1) |
|
|
187 | (1) |
|
3.3.6 Attribute and Item "Getters" |
|
|
188 | (2) |
|
3.3.7 Combining Operators and Custom Classes |
|
|
190 | (1) |
|
3.4 contextlib: Context Manager Utilities |
|
|
191 | (20) |
|
3.4.1 Context Manager API |
|
|
191 | (3) |
|
3.4.2 Context Managers as Function Decorators |
|
|
194 | (2) |
|
3.4.3 From Generator to Context Manager |
|
|
196 | (2) |
|
3.4.4 Closing Open Handles |
|
|
198 | (1) |
|
3.4.5 Ignoring Exceptions |
|
|
199 | (2) |
|
3.4.6 Redirecting Output Streams |
|
|
201 | (1) |
|
3.4.7 Dynamic Context Manager Stacks |
|
|
202 | (9) |
Chapter 4 Dates and Times |
|
211 | (28) |
|
|
211 | (10) |
|
|
211 | (2) |
|
|
213 | (1) |
|
|
214 | (1) |
|
4.1.4 Processor Clock Time |
|
|
214 | (2) |
|
4.1.5 Performance Counter |
|
|
216 | (1) |
|
|
217 | (1) |
|
4.1.7 Working with Time Zones |
|
|
218 | (1) |
|
4.1.8 Parsing and Formatting Times |
|
|
219 | (2) |
|
4.2 datetime: Date and Time Value Manipulation |
|
|
221 | (12) |
|
|
221 | (1) |
|
|
222 | (3) |
|
|
225 | (1) |
|
|
226 | (2) |
|
|
228 | (1) |
|
4.2.6 Combining Dates and Times |
|
|
228 | (2) |
|
4.2.7 Formatting and Parsing |
|
|
230 | (1) |
|
|
231 | (2) |
|
4.3 calendar: Work with Dates |
|
|
233 | (6) |
|
4.3.1 Formatting Examples |
|
|
233 | (3) |
|
|
236 | (1) |
|
|
236 | (3) |
Chapter 5 Mathematics |
|
239 | (56) |
|
5.1 decimal: Fixed-and Floating-Point Math |
|
|
239 | (11) |
|
|
239 | (2) |
|
|
241 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (6) |
|
5.2 fractions: Rational Numbers |
|
|
250 | (4) |
|
5.2.1 Creating Fraction Instances |
|
|
250 | (2) |
|
|
252 | (1) |
|
5.2.3 Approximating Values |
|
|
253 | (1) |
|
5.3 random: Pseudorandom Number Generators |
|
|
254 | (10) |
|
5.3.1 Generating Random Numbers |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
255 | (2) |
|
|
257 | (1) |
|
5.3.5 Picking Random Items |
|
|
258 | (1) |
|
|
258 | (2) |
|
|
260 | (1) |
|
5.3.8 Multiple Simultaneous Generators |
|
|
261 | (1) |
|
|
262 | (1) |
|
5.3.10 Non-uniform Distributions |
|
|
263 | (1) |
|
5.4 math: Mathematical Functions |
|
|
264 | (26) |
|
|
265 | (1) |
|
5.4.2 Testing for Exceptional Values |
|
|
265 | (2) |
|
|
267 | (3) |
|
5.4.4 Converting Floating-Point Values to Integers |
|
|
270 | (1) |
|
5.4.5 Alternative Representations of Floating-Point Values |
|
|
271 | (1) |
|
5.4.6 Positive and Negative Signs |
|
|
272 | (2) |
|
5.4.7 Commonly Used Calculations |
|
|
274 | (4) |
|
5.4.8 Exponents and Logarithms |
|
|
278 | (4) |
|
|
282 | (2) |
|
|
284 | (4) |
|
5.4.11 Hyperbolic Functions |
|
|
288 | (1) |
|
|
289 | (1) |
|
5.5 statistics: Statistical Calculations |
|
|
290 | (5) |
|
|
290 | (2) |
|
|
292 | (3) |
Chapter 6 The File System |
|
295 | (100) |
|
6.1 os.path: Platform-Independent Manipulation of Filenames |
|
|
296 | (9) |
|
|
296 | (4) |
|
|
300 | (1) |
|
|
301 | (1) |
|
|
302 | (1) |
|
|
303 | (2) |
|
6.2 pathlib: File System Paths as Objects |
|
|
305 | (14) |
|
6.2.1 Path Representations |
|
|
305 | (1) |
|
|
305 | (2) |
|
|
307 | (2) |
|
6.2.4 Creating Concrete Paths |
|
|
309 | (1) |
|
|
309 | (3) |
|
6.2.6 Reading and Writing Files |
|
|
312 | (1) |
|
6.2.7 Manipulating Directories and Symbolic Links |
|
|
312 | (1) |
|
|
313 | (2) |
|
|
315 | (2) |
|
|
317 | (1) |
|
|
318 | (1) |
|
6.3 glob: Filename Pattern Matching |
|
|
319 | (4) |
|
|
320 | (1) |
|
|
320 | (1) |
|
6.3.3 Single-Character Wildcard |
|
|
321 | (1) |
|
|
322 | (1) |
|
6.3.5 Escaping Meta-characters |
|
|
322 | (1) |
|
6.4 fnmatch: Unix-Style Glob Pattern Matching |
|
|
323 | (3) |
|
|
323 | (2) |
|
|
325 | (1) |
|
6.4.3 Translating Patterns |
|
|
325 | (1) |
|
6.5 linecache: Read Text Files Efficiently |
|
|
326 | (4) |
|
|
326 | (1) |
|
6.5.2 Reading Specific Lines |
|
|
327 | (1) |
|
6.5.3 Handling Blank Lines |
|
|
328 | (1) |
|
|
328 | (1) |
|
6.5.5 Reading Python Source Files |
|
|
329 | (1) |
|
6.6 tempfile: Temporary File System Objects |
|
|
330 | (7) |
|
|
331 | (2) |
|
|
333 | (1) |
|
|
333 | (2) |
|
6.6.4 Temporary Directories |
|
|
335 | (1) |
|
|
335 | (1) |
|
6.6.6 Temporary File Location |
|
|
336 | (1) |
|
6.7 shutil: High-Level File Operations |
|
|
337 | (14) |
|
|
337 | (3) |
|
6.7.2 Copying File Metadata |
|
|
340 | (2) |
|
6.7.3 Working with Directory Trees |
|
|
342 | (3) |
|
|
345 | (1) |
|
|
346 | (4) |
|
|
350 | (1) |
|
6.8 filecmp: Compare Files |
|
|
351 | (10) |
|
|
351 | (2) |
|
|
353 | (2) |
|
6.8.3 Comparing Directories |
|
|
355 | (2) |
|
6.8.4 Using Differences in a Program |
|
|
357 | (4) |
|
6.9 mmap: Memory-Map Files |
|
|
361 | (4) |
|
|
361 | (1) |
|
|
362 | (2) |
|
6.9.3 Regular Expressions |
|
|
364 | (1) |
|
6.10 codecs: String Encoding and Decoding |
|
|
365 | (25) |
|
|
365 | (3) |
|
6.10.2 Working with Files |
|
|
368 | (2) |
|
|
370 | (2) |
|
|
372 | (4) |
|
6.10.5 Encoding Translation |
|
|
376 | (1) |
|
6.10.6 Non-Unicode Encodings |
|
|
377 | (1) |
|
6.10.7 Incremental Encoding |
|
|
378 | (2) |
|
6.10.8 Unicode Data and Network Communication |
|
|
380 | (3) |
|
6.10.9 Defining a Custom Encoding |
|
|
383 | (7) |
|
6.11 io: Text, Binary, and Raw Stream I/O Tools |
|
|
390 | (5) |
|
|
390 | (2) |
|
6.11.2 Wrapping Byte Streams for Text Data |
|
|
392 | (3) |
Chapter 7 Data Persistence and Exchange |
|
395 | (82) |
|
7.1 pickle: Object Serialization |
|
|
396 | (9) |
|
7.1.1 Encoding and Decoding Data in Strings |
|
|
396 | (1) |
|
7.1.2 Working with Streams |
|
|
397 | (2) |
|
7.1.3 Problems Reconstructing Objects |
|
|
399 | (1) |
|
7.1.4 Unpicklable Objects |
|
|
400 | (2) |
|
7.1.5 Circular References |
|
|
402 | (3) |
|
7.2 shelve: Persistent Storage of Objects |
|
|
405 | (3) |
|
7.2.1 Creating a New Shelf |
|
|
405 | (1) |
|
|
406 | (2) |
|
7.2.3 Specific Shelf Types |
|
|
408 | (1) |
|
7.3 dbm: Unix Key-Value Databases |
|
|
408 | (4) |
|
|
408 | (1) |
|
7.3.2 Creating a New Database |
|
|
409 | (1) |
|
7.3.3 Opening an Existing Database |
|
|
410 | (1) |
|
|
411 | (1) |
|
7.4 sqlite3: Embedded Relational Database |
|
|
412 | (33) |
|
7.4.1 Creating a Database |
|
|
412 | (3) |
|
|
415 | (2) |
|
|
417 | (1) |
|
|
417 | (2) |
|
7.4.5 Using Variables with Queries |
|
|
419 | (2) |
|
|
421 | (1) |
|
7.4.7 Defining New Column Types |
|
|
422 | (4) |
|
7.4.8 Determining Types for Columns |
|
|
426 | (2) |
|
|
428 | (3) |
|
|
431 | (3) |
|
7.4.11 In-Memory Databases |
|
|
434 | (1) |
|
7.4.12 Exporting the Contents of a Database |
|
|
435 | (1) |
|
7.4.13 Using Python Functions in SQL |
|
|
436 | (3) |
|
7.4.14 Querying with Regular Expressions |
|
|
439 | (1) |
|
7.4.15 Custom Aggregation |
|
|
440 | (1) |
|
7.4.16 Threading and Connection Sharing |
|
|
441 | (1) |
|
7.4.17 Restricting Access to Data |
|
|
442 | (3) |
|
7.5 xml.etree.ElementTree: XML Manipulation API |
|
|
445 | (21) |
|
7.5.1 Parsing an XML Document |
|
|
445 | (1) |
|
7.5.2 Traversing the Parsed Tree |
|
|
446 | (1) |
|
7.5.3 Finding Nodes in a Document |
|
|
447 | (2) |
|
7.5.4 Parsed Node Attributes |
|
|
449 | (2) |
|
7.5.5 Watching Events While Parsing |
|
|
451 | (2) |
|
7.5.6 Creating a Custom Tree Builder |
|
|
453 | (2) |
|
|
455 | (2) |
|
7.5.8 Building Documents With Element Nodes |
|
|
457 | (1) |
|
7.5.9 Pretty-Printing XML |
|
|
458 | (1) |
|
7.5.10 Setting Element Properties |
|
|
459 | (2) |
|
7.5.11 Building Trees from Lists of Nodes |
|
|
461 | (3) |
|
7.5.12 Serializing XML to a Stream |
|
|
464 | (2) |
|
7.6 csv: Comma-Separated Value Files |
|
|
466 | (11) |
|
|
466 | (1) |
|
|
467 | (2) |
|
|
469 | (5) |
|
|
474 | (3) |
Chapter 8 Data Compression and Archiving |
|
477 | (46) |
|
8.1 zlib: GNU zlib Compression |
|
|
477 | (9) |
|
8.1.1 Working with Data in Memory |
|
|
477 | (2) |
|
8.1.2 Incremental Compression and Decompression |
|
|
479 | (1) |
|
8.1.3 Mixed Content Streams |
|
|
480 | (1) |
|
|
481 | (1) |
|
8.1.5 Compressing Network Data |
|
|
482 | (4) |
|
8.2 gzip: Read and Write GNU zip Files |
|
|
486 | (5) |
|
8.2.1 Writing Compressed Files |
|
|
486 | (3) |
|
8.2.2 Reading Compressed Data |
|
|
489 | (1) |
|
8.2.3 Working with Streams |
|
|
490 | (1) |
|
8.3 bz2: bzip2 Compression |
|
|
491 | (12) |
|
8.3.1 One-Shot Operations in Memory |
|
|
492 | (1) |
|
8.3.2 Incremental Compression and Decompression |
|
|
493 | (1) |
|
8.3.3 Mixed-Content Streams |
|
|
494 | (1) |
|
8.3.4 Writing Compressed Files |
|
|
495 | (2) |
|
8.3.5 Reading Compressed Files |
|
|
497 | (1) |
|
8.3.6 Reading and Writing Unicode Data |
|
|
498 | (1) |
|
8.3.7 Compressing Network Data |
|
|
499 | (4) |
|
8.4 tarfile: Tar Archive Access |
|
|
503 | (8) |
|
|
503 | (1) |
|
8.4.2 Reading Metadata from an Archive |
|
|
504 | (2) |
|
8.4.3 Extracting Files from an Archive |
|
|
506 | (2) |
|
8.4.4 Creating New Archives |
|
|
508 | (1) |
|
8.4.5 Using Alternative Archive Member Names |
|
|
508 | (1) |
|
8.4.6 Writing Data from Sources Other Than Files |
|
|
509 | (1) |
|
8.4.7 Appending to Archives |
|
|
510 | (1) |
|
8.4.8 Working with Compressed Archives |
|
|
510 | (1) |
|
8.5 zipfile: ZIP Archive Access |
|
|
511 | (12) |
|
|
512 | (1) |
|
8.5.2 Reading Metadata from an Archive |
|
|
512 | (2) |
|
8.5.3 Extracting Archived Files From an Archive |
|
|
514 | (1) |
|
8.5.4 Creating New Archives |
|
|
514 | (2) |
|
8.5.5 Using Alternative Archive Member Names |
|
|
516 | (1) |
|
8.5.6 Writing Data from Sources Other Than Files |
|
|
517 | (1) |
|
8.5.7 Writing with a Zipinfo Instance |
|
|
517 | (1) |
|
|
518 | (1) |
|
8.5.9 Python ZIP Archives |
|
|
519 | (2) |
|
|
521 | (2) |
Chapter 9 Cryptography |
|
523 | (12) |
|
9.1 hashlib: Cryptographic Hashing |
|
|
523 | (5) |
|
|
523 | (1) |
|
|
524 | (1) |
|
|
524 | (1) |
|
|
525 | (1) |
|
9.1.5 Creating a Hash by Name |
|
|
525 | (1) |
|
9.1.6 Incremental Updates |
|
|
526 | (2) |
|
9.2 hmac: Cryptographic Message Signing and Verification |
|
|
528 | (7) |
|
|
528 | (1) |
|
9.2.2 Alternative Digest Types |
|
|
528 | (1) |
|
|
529 | (1) |
|
9.2.4 Applications of Message Signatures |
|
|
530 | (5) |
Chapter 10 Concurrency with Processes, Threads, and Coroutines |
|
535 | (152) |
|
10.1 subprocess: Spawning Additional Processes |
|
|
535 | (18) |
|
10.1.1 Running External Command |
|
|
536 | (6) |
|
10.1.2 Working with Pipes Directly |
|
|
542 | (3) |
|
10.1.3 Connecting Segments of a Pipe |
|
|
545 | (1) |
|
10.1.4 Interacting with Another Command |
|
|
546 | (2) |
|
10.1.5 Signaling Between Processes |
|
|
548 | (5) |
|
10.2 signal: Asynchronous System Events |
|
|
553 | (7) |
|
|
554 | (1) |
|
10.2.2 Retrieving Registered Handlers |
|
|
555 | (1) |
|
|
556 | (1) |
|
|
556 | (1) |
|
|
557 | (1) |
|
10.2.6 Signals and Threads |
|
|
558 | (2) |
|
10.3 threading: Manage Concurrent Operations Within a Process |
|
|
560 | (26) |
|
|
560 | (2) |
|
10.3.2 Determining the Current Thread |
|
|
562 | (2) |
|
10.3.3 Daemon Versus Non-daemon Threads |
|
|
564 | (3) |
|
10.3.4 Enumerating All Threads |
|
|
567 | (1) |
|
10.3.5 Subclassing Thread |
|
|
568 | (2) |
|
|
570 | (1) |
|
10.3.7 Signaling Between Threads |
|
|
571 | (1) |
|
10.3.8 Controlling Access to Resources |
|
|
572 | (6) |
|
10.3.9 Synchronizing Threads |
|
|
578 | (3) |
|
10.3.10 Limiting Concurrent Access to Resources |
|
|
581 | (2) |
|
10.3.11 Thread Specific Data |
|
|
583 | (3) |
|
10.4 multiprocessing: Manage Processes Like Threads |
|
|
586 | (31) |
|
10.4.1 multiprocessing Basics |
|
|
586 | (1) |
|
10.4.2 Importable Target Functions |
|
|
587 | (1) |
|
10.4.3 Determining the Current Process |
|
|
588 | (1) |
|
|
589 | (2) |
|
10.4.5 Waiting for Processes |
|
|
591 | (2) |
|
10.4.6 Terminating Processes |
|
|
593 | (1) |
|
10.4.7 Process Exit Status |
|
|
594 | (2) |
|
|
596 | (1) |
|
10.4.9 Subclassing Process |
|
|
597 | (1) |
|
10.4.10 Passing Messages to Processes |
|
|
598 | (4) |
|
10.4.11 Signaling Between Processes |
|
|
602 | (1) |
|
10.4.12 Controlling Access to Resources |
|
|
603 | (1) |
|
10.4.13 Synchronizing Operations |
|
|
604 | (1) |
|
10.4.14 Controlling Concurrent Access to Resources |
|
|
605 | (3) |
|
10.4.15 Managing Shared State |
|
|
608 | (1) |
|
10.4.16 Shared Namespaces |
|
|
608 | (3) |
|
|
611 | (2) |
|
10.4.18 Implementing MapReduce |
|
|
613 | (4) |
|
10.5 asyncio: Asynchronous I/O, Event Loop, and Concurrency Tools |
|
|
617 | (60) |
|
10.5.1 Asynchronous Concurrency Concepts |
|
|
618 | (1) |
|
10.5.2 Cooperative Multitasking with Coroutines |
|
|
618 | (4) |
|
10.5.3 Scheduling Calls to Regular Functions |
|
|
622 | (3) |
|
10.5.4 Producing Results Asynchronously |
|
|
625 | (3) |
|
10.5.5 Executing Tasks Concurrently |
|
|
628 | (4) |
|
10.5.6 Composing Coroutines with Control Structures |
|
|
632 | (5) |
|
10.5.7 Synchronization Primitives |
|
|
637 | (7) |
|
10.5.8 Asynchronous I/O with Protocol Class Abstractions |
|
|
644 | (6) |
|
10.5.9 Asynchronous I/O Using Coroutines and Streams |
|
|
650 | (6) |
|
|
656 | (2) |
|
10.5.11 Interacting with Domain Name Services |
|
|
658 | (3) |
|
10.5.12 Working with Subprocesses |
|
|
661 | (7) |
|
10.5.13 Receiving Unix Signals |
|
|
668 | (2) |
|
10.5.14 Combining Coroutines with Threads and Processes |
|
|
670 | (3) |
|
10.5.15 Debugging with asyncio |
|
|
673 | (4) |
|
10.6 concurrent.futures: Manage Pools of Concurrent Tasks |
|
|
677 | (10) |
|
10.6.1 Using map() with a Basic Thread Pool |
|
|
677 | (1) |
|
10.6.2 Scheduling Individual Tasks |
|
|
678 | (1) |
|
10.6.3 Waiting for Tasks in Any Order |
|
|
679 | (1) |
|
|
680 | (1) |
|
|
681 | (2) |
|
10.6.6 Exceptions in Tasks |
|
|
683 | (1) |
|
|
683 | (1) |
|
|
684 | (3) |
Chapter 11 Networking |
|
687 | (66) |
|
11.1 ipaddress: Internet Addresses |
|
|
687 | (6) |
|
|
687 | (1) |
|
|
688 | (4) |
|
|
692 | (1) |
|
11.2 socket: Network Communication |
|
|
693 | (31) |
|
11.2.1 Addressing, Protocol Families, and Socket Types |
|
|
693 | (11) |
|
11.2.2 TCP/IP Client and Server |
|
|
704 | (7) |
|
11.2.3 User Datagram Client and Server |
|
|
711 | (3) |
|
11.2.4 Unix Domain Sockets |
|
|
714 | (3) |
|
|
717 | (4) |
|
11.2.6 Sending Binary Data |
|
|
721 | (2) |
|
11.2.7 Non-blocking Communication and Timeouts |
|
|
723 | (1) |
|
11.3 selectors: I/O Multiplexing Abstractions |
|
|
724 | (4) |
|
|
724 | (1) |
|
|
724 | (2) |
|
|
726 | (1) |
|
11.3.4 Server and Client Together |
|
|
727 | (1) |
|
11.4 select: Wait for I/O Efficiently |
|
|
728 | (14) |
|
|
729 | (5) |
|
11.4.2 Non-blocking I/O with Timeouts |
|
|
734 | (3) |
|
|
737 | (5) |
|
11.4.4 Platform-Specific Options |
|
|
742 | (1) |
|
11.5 socketserver: Creating Network Servers |
|
|
742 | (11) |
|
|
742 | (1) |
|
|
743 | (1) |
|
11.5.3 Implementing a Server |
|
|
743 | (1) |
|
|
743 | (1) |
|
|
744 | (5) |
|
11.5.6 Threading and Forking |
|
|
749 | (4) |
Chapter 12 The Internet |
|
753 | (88) |
|
12.1 urllib.parse: Split URLs into Components |
|
|
753 | (8) |
|
|
754 | (2) |
|
|
756 | (2) |
|
|
758 | (1) |
|
12.1.4 Encoding Query Arguments |
|
|
759 | (2) |
|
12.2 urllib.request: Network Resource Access |
|
|
761 | (12) |
|
|
761 | (2) |
|
12.2.2 Encoding Arguments |
|
|
763 | (1) |
|
|
764 | (1) |
|
12.2.4 Adding Outgoing Headers |
|
|
765 | (1) |
|
12.2.5 Posting Form Data from a Request |
|
|
766 | (1) |
|
|
767 | (3) |
|
12.2.7 Creating Custom Protocol Handlers |
|
|
770 | (3) |
|
12.3 urllib.robotparser: Internet Spider Access Control |
|
|
773 | (3) |
|
|
773 | (1) |
|
12.3.2 Testing Access Permissions |
|
|
774 | (1) |
|
12.3.3 Long-Lived Spiders |
|
|
775 | (1) |
|
12.4 base64: Encode Binary Data with ASCII |
|
|
776 | (5) |
|
|
777 | (1) |
|
|
778 | (1) |
|
12.4.3 URL-Safe Variations |
|
|
778 | (1) |
|
|
779 | (2) |
|
12.5 http.server: Base Classes for Implementing Web Servers |
|
|
781 | (9) |
|
|
781 | (3) |
|
|
784 | (2) |
|
12.5.3 Threading and Forking |
|
|
786 | (1) |
|
|
787 | (1) |
|
|
788 | (1) |
|
|
789 | (1) |
|
12.6 http.cookies: HTTP Cookies |
|
|
790 | (6) |
|
12.6.1 Creating and Setting a Cookie |
|
|
790 | (1) |
|
|
791 | (2) |
|
|
793 | (1) |
|
12.6.4 Receiving and Parsing Cookie Headers |
|
|
794 | (1) |
|
12.6.5 Alternative Output Formats |
|
|
795 | (1) |
|
12.7 webbrowser: Displays Web Pages |
|
|
796 | (1) |
|
|
796 | (1) |
|
12.7.2 Windows Versus Tabs |
|
|
796 | (1) |
|
12.7.3 Using a Specific Browser |
|
|
796 | (1) |
|
|
797 | (1) |
|
12.7.5 Command-Line Interface |
|
|
797 | (1) |
|
12.8 uuid: Universally Unique Identifiers |
|
|
797 | (6) |
|
12.8.1 UUID 1: IEEE 802 MAC Address |
|
|
798 | (2) |
|
12.8.2 UUID 3 and 5: Name-Based Values |
|
|
800 | (2) |
|
12.8.3 UUID 4: Random Values |
|
|
802 | (1) |
|
12.8.4 Working with UUID Objects |
|
|
802 | (1) |
|
12.9 json: JavaScript Object Notation |
|
|
803 | (13) |
|
12.9.1 Encoding and Decoding Simple Data Types |
|
|
804 | (1) |
|
12.9.2 Human-Consumable Versus Compact Output |
|
|
805 | (2) |
|
12.9.3 Encoding Dictionaries |
|
|
807 | (1) |
|
12.9.4 Working with Custom Types |
|
|
807 | (3) |
|
12.9.5 Encoder and Decoder Classes |
|
|
810 | (3) |
|
12.9.6 Working with Streams and Files |
|
|
813 | (1) |
|
12.9.7 Mixed Data Streams |
|
|
813 | (2) |
|
12.9.8 JSON at the Command Line |
|
|
815 | (1) |
|
12.10 xmlrpc.client: Client Library for XML-RPC |
|
|
816 | (11) |
|
12.10.1 Connecting to a Server |
|
|
817 | (2) |
|
|
819 | (3) |
|
|
822 | (1) |
|
|
823 | (2) |
|
12.10.5 Exception Handling |
|
|
825 | (1) |
|
12.10.6 Combining Calls into One Message |
|
|
826 | (1) |
|
12.11 xmlrpc.server: An XML-RPC Server |
|
|
827 | (14) |
|
|
828 | (1) |
|
12.11.2 Alternate API Names |
|
|
829 | (1) |
|
|
830 | (1) |
|
12.11.4 Arbitrary API Names |
|
|
831 | (1) |
|
12.11.5 Exposing Methods of Objects |
|
|
832 | (2) |
|
12.11.6 Dispatching Calls |
|
|
834 | (3) |
|
12.11.7 Introspection API |
|
|
837 | (4) |
Chapter 13 Email |
|
841 | (46) |
|
13.1 smtplib: Simple Mail Transfer Protocol Client |
|
|
841 | (6) |
|
13.1.1 Sending an Email Message |
|
|
841 | (2) |
|
13.1.2 Authentication and Encryption |
|
|
843 | (3) |
|
13.1.3 Verifying an Email Address |
|
|
846 | (1) |
|
13.2 smtpd: Sample Mail Servers |
|
|
847 | (5) |
|
13.2.1 Mail Server Base Class |
|
|
847 | (3) |
|
|
850 | (1) |
|
|
851 | (1) |
|
13.3 mailbox: Manipulate Email Archives |
|
|
852 | (12) |
|
|
852 | (3) |
|
|
855 | (7) |
|
|
862 | (2) |
|
|
864 | (1) |
|
13.4 imaplib: IMAP4 Client Library |
|
|
864 | (23) |
|
|
864 | (1) |
|
13.4.2 Connecting to a Server |
|
|
864 | (2) |
|
13.4.3 Example Configuration |
|
|
866 | (1) |
|
|
866 | (3) |
|
|
869 | (2) |
|
13.4.6 Selecting a Mailbox |
|
|
871 | (1) |
|
13.4.7 Searching for Messages |
|
|
872 | (1) |
|
|
872 | (2) |
|
|
874 | (6) |
|
|
880 | (1) |
|
13.4.11 Uploading Messages |
|
|
881 | (2) |
|
13.4.12 Moving and Copying Messages |
|
|
883 | (1) |
|
13.4.13 Deleting Messages |
|
|
884 | (3) |
Chapter 14 Application Building Blocks |
|
887 | (116) |
|
14.1 argparse: Command-Line Option and Argument Parsing |
|
|
888 | (28) |
|
14.1.1 Setting Up a Parser |
|
|
888 | (1) |
|
14.1.2 Defining Arguments |
|
|
888 | (1) |
|
14.1.3 Parsing a Command Line |
|
|
889 | (1) |
|
|
889 | (8) |
|
|
897 | (4) |
|
14.1.6 Parser Organization |
|
|
901 | (7) |
|
14.1.7 Advanced Argument Processing |
|
|
908 | (8) |
|
14.2 getopt: Command-Line Option Parsing |
|
|
916 | (6) |
|
14.2.1 Function Arguments |
|
|
916 | (1) |
|
14.2.2 Short-Form Options |
|
|
917 | (1) |
|
|
917 | (1) |
|
14.2.4 A Complete Example |
|
|
918 | (2) |
|
14.2.5 Abbreviating Long-Form Options |
|
|
920 | (1) |
|
14.2.6 GNU-Style Option Parsing |
|
|
920 | (2) |
|
14.2.7 Ending Argument Processing |
|
|
922 | (1) |
|
14.3 readline: The GNU readline Library |
|
|
922 | (13) |
|
14.3.1 Configuring readline |
|
|
923 | (1) |
|
|
924 | (3) |
|
14.3.3 Accessing the Completion Buffer |
|
|
927 | (4) |
|
|
931 | (3) |
|
|
934 | (1) |
|
14.4 getpass: Secure Password Prompt |
|
|
935 | (3) |
|
|
935 | (2) |
|
14.4.2 Using getpass Without a Terminal |
|
|
937 | (1) |
|
14.5 cmd: Line-Oriented Command Processors |
|
|
938 | (13) |
|
14.5.1 Processing Commands |
|
|
938 | (2) |
|
|
940 | (1) |
|
|
941 | (1) |
|
|
942 | (2) |
|
14.5.5 Overriding Base Class Methods |
|
|
944 | (2) |
|
14.5.6 Configuring Cmd Through Attributes |
|
|
946 | (1) |
|
14.5.7 Running Shell Commands |
|
|
947 | (1) |
|
14.5.8 Alternative Inputs |
|
|
948 | (2) |
|
14.5.9 Commands from sys.argv |
|
|
950 | (1) |
|
14.6 shlex: Parse Shell-Style Syntaxes |
|
|
951 | (9) |
|
14.6.1 Parsing Quoted Strings |
|
|
951 | (2) |
|
14.6.2 Making Safe Strings for Shells |
|
|
953 | (1) |
|
|
954 | (1) |
|
14.6.4 Splitting Strings into Tokens |
|
|
954 | (1) |
|
14.6.5 Including Other Sources of Tokens |
|
|
955 | (1) |
|
14.6.6 Controlling the Parser |
|
|
956 | (1) |
|
|
957 | (2) |
|
14.6.8 POSIX Versus Non-POSIX Parsing |
|
|
959 | (1) |
|
14.7 configparser: Work with Configuration Files |
|
|
960 | (20) |
|
14.7.1 Configuration File Format |
|
|
961 | (1) |
|
14.7.2 Reading Configuration Files |
|
|
961 | (2) |
|
14.7.3 Accessing Configuration Settings |
|
|
963 | (7) |
|
14.7.4 Modifying Settings |
|
|
970 | (2) |
|
14.7.5 Saving Configuration Files |
|
|
972 | (1) |
|
14.7.6 Option Search Path |
|
|
972 | (3) |
|
14.7.7 Combining Values with Interpolation |
|
|
975 | (5) |
|
14.8 logging: Report Status, Error, and Informational Messages |
|
|
980 | (6) |
|
14.8.1 Logging Components |
|
|
980 | (1) |
|
14.8.2 Logging in Applications Versus Libraries |
|
|
980 | (1) |
|
|
981 | (1) |
|
14.8.4 Rotating Log Files |
|
|
981 | (1) |
|
|
982 | (2) |
|
14.8.6 Naming Logger Instances |
|
|
984 | (1) |
|
|
984 | (1) |
|
14.8.8 Integration with the warnings Module |
|
|
985 | (1) |
|
14.9 fileinput: Command-Line Filter Framework |
|
|
986 | (7) |
|
14.9.1 Converting M3U Files to RSS |
|
|
987 | (2) |
|
|
989 | (1) |
|
14.9.3 In-Place Filtering |
|
|
990 | (3) |
|
14.10 atexit: Program Shutdown Callbacks |
|
|
993 | (5) |
|
14.10.1 Registering Exit Callbacks |
|
|
993 | (1) |
|
|
994 | (1) |
|
14.10.3 Canceling Callbacks |
|
|
994 | (1) |
|
14.10.4 When Are atexit Callbacks Not Called? |
|
|
995 | (2) |
|
14.10.5 Handling Exceptions |
|
|
997 | (1) |
|
14.11 sched: Timed Event Scheduler |
|
|
998 | (5) |
|
14.11.1 Running Events with a Delay |
|
|
999 | (1) |
|
14.11.2 Overlapping Events |
|
|
1000 | (1) |
|
|
1001 | (1) |
|
|
1001 | (2) |
Chapter 15 Internationalization and Localization |
|
1003 | (20) |
|
15.1 gettext: Message Catalogs |
|
|
1003 | (9) |
|
15.1.1 Translation Workflow Overview |
|
|
1003 | (1) |
|
15.1.2 Creating Message Catalogs from Source Code |
|
|
1004 | (3) |
|
15.1.3 Finding Message Catalogs at Runtime |
|
|
1007 | (1) |
|
|
1008 | (3) |
|
15.1.5 Application Versus Module Localization |
|
|
1011 | (1) |
|
15.1.6 Switching Translations |
|
|
1012 | (1) |
|
15.2 locale: Cultural Localization API |
|
|
1012 | (11) |
|
15.2.1 Probing the Current Locale |
|
|
1013 | (5) |
|
|
1018 | (1) |
|
15.2.3 Formatting Numbers |
|
|
1019 | (2) |
|
|
1021 | (1) |
|
|
1022 | (1) |
Chapter 16 Developer Tools |
|
1023 | (146) |
|
16.1 pydoc: Online Help for Modules |
|
|
1024 | (2) |
|
|
1024 | (1) |
|
|
1025 | (1) |
|
|
1026 | (1) |
|
16.2 doctest: Testing Through Documentation |
|
|
1026 | (25) |
|
|
1026 | (2) |
|
16.2.2 Handling Unpredictable Output |
|
|
1028 | (4) |
|
|
1032 | (2) |
|
16.2.4 Working Around Whitespace |
|
|
1034 | (5) |
|
|
1039 | (3) |
|
16.2.6 External Documentation |
|
|
1042 | (2) |
|
|
1044 | (4) |
|
|
1048 | (3) |
|
16.3 unittest: Automated Testing Framework |
|
|
1051 | (18) |
|
16.3.1 Basic Test Structure |
|
|
1051 | (1) |
|
|
1051 | (1) |
|
|
1052 | (2) |
|
|
1054 | (1) |
|
|
1054 | (1) |
|
|
1055 | (1) |
|
|
1056 | (5) |
|
16.3.8 Testing for Exceptions |
|
|
1061 | (1) |
|
|
1062 | (3) |
|
16.3.10 Repeating Tests with Different Inputs |
|
|
1065 | (1) |
|
|
1066 | (2) |
|
16.3.12 Ignoring Failing Tests |
|
|
1068 | (1) |
|
16.4 trace: Follow Program Flow |
|
|
1069 | (9) |
|
|
1069 | (1) |
|
|
1069 | (1) |
|
|
1070 | (3) |
|
16.4.4 Calling Relationships |
|
|
1073 | (1) |
|
16.4.5 Programming Interface |
|
|
1074 | (2) |
|
16.4.6 Saving Result Data |
|
|
1076 | (1) |
|
|
1077 | (1) |
|
16.5 traceback: Exceptions and Stack Traces |
|
|
1078 | (11) |
|
16.5.1 Supporting Functions |
|
|
1079 | (1) |
|
16.5.2 Examining the Stack |
|
|
1079 | (2) |
|
16.5.3 TracebackException |
|
|
1081 | (1) |
|
16.5.4 Low-Level Exception APIs |
|
|
1082 | (4) |
|
16.5.5 Low-Level Stack APIs |
|
|
1086 | (3) |
|
16.6 cgitb: Detailed Traceback Reports |
|
|
1089 | (12) |
|
16.6.1 Standard Traceback Dumps |
|
|
1089 | (1) |
|
16.6.2 Enabling Detailed Tracebacks |
|
|
1090 | (3) |
|
16.6.3 Local Variables in Tracebacks |
|
|
1093 | (3) |
|
16.6.4 Exception Properties |
|
|
1096 | (2) |
|
|
1098 | (1) |
|
16.6.6 Logging Tracebacks |
|
|
1098 | (3) |
|
16.7 pdb: Interactive Debugger |
|
|
1101 | (39) |
|
16.7.1 Starting the Debugger |
|
|
1101 | (3) |
|
16.7.2 Controlling the Debugger |
|
|
1104 | (13) |
|
|
1117 | (12) |
|
16.7.4 Changing Execution Flow |
|
|
1129 | (7) |
|
16.7.5 Customizing the Debugger with Aliases |
|
|
1136 | (1) |
|
16.7.6 Saving Configuration Settings |
|
|
1137 | (3) |
|
16.8 profile and pstats: Performance Analysis |
|
|
1140 | (8) |
|
16.8.1 Running the Profiler |
|
|
1140 | (3) |
|
16.8.2 Running in a Context |
|
|
1143 | (1) |
|
16.8.3 pstats: Saving and Working with Statistics |
|
|
1144 | (1) |
|
16.8.4 Limiting Report Contents |
|
|
1145 | (1) |
|
16.8.5 Caller/Callee Graphs |
|
|
1146 | (2) |
|
16.9 timeit: Time the Execution of Small Bits of Python Code |
|
|
1148 | (5) |
|
|
1148 | (1) |
|
|
1148 | (1) |
|
16.9.3 Storing Values in a Dictionary |
|
|
1149 | (3) |
|
16.9.4 From the Command Line |
|
|
1152 | (1) |
|
16.10 tabnanny: Indentation Validator |
|
|
1153 | (2) |
|
16.10.1 Running from the Command Line |
|
|
1153 | (2) |
|
16.11 compileall: Byte-Compile Source Files |
|
|
1155 | (5) |
|
16.11.1 Compiling One Directory |
|
|
1155 | (1) |
|
|
1156 | (1) |
|
16.11.3 Compiling sys.path |
|
|
1157 | (1) |
|
16.11.4 Compiling Individual Files |
|
|
1157 | (1) |
|
16.11.5 From the Command Line |
|
|
1158 | (2) |
|
16.12 pyclbr: Class Browser |
|
|
1160 | (3) |
|
16.12.1 Scanning for Classes |
|
|
1161 | (1) |
|
16.12.2 Scanning for Functions |
|
|
1162 | (1) |
|
16.13 venv: Create Virtual Environments |
|
|
1163 | (4) |
|
16.13.1 Creating Environments |
|
|
1163 | (1) |
|
16.13.2 Contents of a Virtual Environment |
|
|
1164 | (1) |
|
16.13.3 Using Virtual Environments |
|
|
1165 | (2) |
|
16.14 ensurepip: Install the Python Package Installer |
|
|
1167 | (2) |
|
|
1167 | (2) |
Chapter 17 Runtime Features |
|
1169 | (110) |
|
17.1 site: Site-wide Configuration |
|
|
1169 | (9) |
|
|
1169 | (2) |
|
|
1171 | (1) |
|
17.1.3 Path Configuration Files |
|
|
1172 | (3) |
|
17.1.4 Customizing Site Configuration |
|
|
1175 | (1) |
|
17.1.5 Customizing User Configuration |
|
|
1176 | (1) |
|
17.1.6 Disabling the site Module |
|
|
1177 | (1) |
|
17.2 sys: System-Specific Configuration |
|
|
1178 | (49) |
|
17.2.1 Interpreter Settings |
|
|
1178 | (7) |
|
17.2.2 Runtime Environment |
|
|
1185 | (2) |
|
17.2.3 Memory Management and Limits |
|
|
1187 | (7) |
|
17.2.4 Exception Handling |
|
|
1194 | (3) |
|
17.2.5 Low-Level Thread Support |
|
|
1197 | (3) |
|
17.2.6 Modules and Imports |
|
|
1200 | (21) |
|
17.2.7 Tracing a Program As It Runs |
|
|
1221 | (6) |
|
17.3 os: Portable Access to Operating System-Specific Features |
|
|
1227 | (19) |
|
17.3.1 Examining the File System Contents |
|
|
1228 | (2) |
|
17.3.2 Managing File System Permissions |
|
|
1230 | (3) |
|
17.3.3 Creating and Deleting Directories |
|
|
1233 | (1) |
|
17.3.4 Working with Symbolic Links |
|
|
1234 | (1) |
|
17.3.5 Safely Replacing an Existing File |
|
|
1234 | (1) |
|
17.3.6 Detecting and Changing the Process Owner |
|
|
1235 | (2) |
|
17.3.7 Managing the Process Environment |
|
|
1237 | (1) |
|
17.3.8 Managing the Process Working Directory |
|
|
1238 | (1) |
|
17.3.9 Running External Commands |
|
|
1239 | (1) |
|
17.3.10 Creating Processes with os.fork() |
|
|
1240 | (2) |
|
17.3.11 Waiting for Child Processes |
|
|
1242 | (2) |
|
17.3.12 Spawning New Processes |
|
|
1244 | (1) |
|
17.3.13 Operating System Error Codes |
|
|
1245 | (1) |
|
17.4 platform: System Version Information |
|
|
1246 | (5) |
|
|
1246 | (1) |
|
|
1247 | (1) |
|
17.4.3 Operating System and Hardware Information |
|
|
1248 | (2) |
|
17.4.4 Executable Architecture |
|
|
1250 | (1) |
|
17.5 resource: System Resource Management |
|
|
1251 | (3) |
|
|
1251 | (1) |
|
|
1252 | (2) |
|
17.6 gc: Garbage Collector |
|
|
1254 | (16) |
|
17.6.1 Tracing References |
|
|
1255 | (3) |
|
17.6.2 Forcing Garbage Collection |
|
|
1258 | (1) |
|
17.6.3 Finding References to Objects That Cannot Be Collected |
|
|
1259 | (2) |
|
17.6.4 Collection Thresholds and Generations |
|
|
1261 | (4) |
|
|
1265 | (5) |
|
17.7 sysconfig: Interpreter Compile-Time Configuration |
|
|
1270 | (9) |
|
17.7.1 Configuration Variables |
|
|
1270 | (2) |
|
17.7.2 Installation Paths |
|
|
1272 | (4) |
|
17.7.3 Python Version and Platform |
|
|
1276 | (3) |
Chapter 18 Language Tools |
|
1279 | (50) |
|
18.1 warnings: Non-fatal Alerts |
|
|
1279 | (8) |
|
18.1.1 Categories and Filtering |
|
|
1280 | (1) |
|
18.1.2 Generating Warnings |
|
|
1280 | (1) |
|
18.1.3 Filtering with Patterns |
|
|
1281 | (2) |
|
|
1283 | (1) |
|
18.1.5 Alternative Message Delivery Functions |
|
|
1284 | (1) |
|
|
1285 | (1) |
|
18.1.7 Stack Level in Warnings |
|
|
1286 | (1) |
|
18.2 abc: Abstract Base Classes |
|
|
1287 | (9) |
|
|
1287 | (1) |
|
18.2.2 Registering a Concrete Class |
|
|
1287 | (1) |
|
18.2.3 Implementation Through Subclassing |
|
|
1288 | (1) |
|
|
1289 | (1) |
|
18.2.5 Incomplete Implementations |
|
|
1290 | (1) |
|
18.2.6 Concrete Methods in ABCs |
|
|
1291 | (1) |
|
18.2.7 Abstract Properties |
|
|
1292 | (3) |
|
18.2.8 Abstract Class and Static Methods |
|
|
1295 | (1) |
|
18.3 dis: Python Byte-Code Disassembler |
|
|
1296 | (15) |
|
|
1297 | (1) |
|
18.3.2 Disassembling Functions |
|
|
1297 | (3) |
|
|
1300 | (1) |
|
|
1301 | (1) |
|
18.3.5 Using Disassembly to Debug |
|
|
1302 | (1) |
|
18.3.6 Performance Analysis of Loops |
|
|
1303 | (6) |
|
18.3.7 Compiler Optimizations |
|
|
1309 | (2) |
|
18.4 inspect: Inspect Live Objects |
|
|
1311 | (18) |
|
|
1311 | (1) |
|
18.4.2 Inspecting Modules |
|
|
1312 | (2) |
|
18.4.3 Inspecting Classes |
|
|
1314 | (2) |
|
18.4.4 Inspecting Instances |
|
|
1316 | (1) |
|
18.4.5 Documentation Strings |
|
|
1316 | (2) |
|
|
1318 | (1) |
|
18.4.7 Method and Function Signatures |
|
|
1319 | (3) |
|
|
1322 | (1) |
|
18.4.9 Method Resolution Order |
|
|
1323 | (1) |
|
18.4.10 The Stack and Frames |
|
|
1324 | (3) |
|
18.4.11 Command-Line Interface |
|
|
1327 | (2) |
Chapter 19 Modules and Packages |
|
1329 | (22) |
|
19.1 importlib: Python's Import Mechanism |
|
|
1329 | (5) |
|
|
1329 | (1) |
|
|
1330 | (1) |
|
|
1331 | (1) |
|
|
1332 | (2) |
|
19.2 pkgutil: Package Utilities |
|
|
1334 | (10) |
|
19.2.1 Package Import Paths |
|
|
1334 | (2) |
|
19.2.2 Development Versions of Packages |
|
|
1336 | (2) |
|
19.2.3 Managing Paths with PKG Files |
|
|
1338 | (2) |
|
|
1340 | (1) |
|
|
1341 | (3) |
|
19.3 zipimport: Load Python Code from ZIP Archives |
|
|
1344 | (7) |
|
|
1344 | (1) |
|
|
1345 | (1) |
|
|
1345 | (1) |
|
|
1346 | (2) |
|
|
1348 | (1) |
|
|
1348 | (3) |
Appendix A: Porting Notes |
|
1351 | (16) |
|
|
1351 | (1) |
|
|
1352 | (1) |
|
|
1352 | (2) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
A.4.9 mimetools, MimeWriter, mimify, multifile, and rfc822 |
|
|
1354 | (1) |
|
|
1354 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
A.5.1 asyncore and asynchat |
|
|
1355 | (1) |
|
|
1355 | (1) |
|
|
1356 | (1) |
|
|
1356 | (1) |
|
A.6 Summary of Changes to Modules |
|
|
1356 | (11) |
|
|
1356 | (1) |
|
|
1356 | (1) |
|
|
1356 | (1) |
|
|
1357 | (1) |
|
|
1357 | (1) |
|
|
1357 | (1) |
|
|
1357 | (1) |
|
|
1357 | (1) |
|
|
1357 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1358 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1359 | (1) |
|
|
1360 | (1) |
|
|
1360 | (1) |
|
|
1360 | (1) |
|
|
1360 | (1) |
|
|
1360 | (1) |
|
|
1361 | (1) |
|
|
1361 | (1) |
|
|
1361 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1362 | (1) |
|
|
1363 | (1) |
|
|
1363 | (1) |
|
|
1363 | (1) |
|
|
1363 | (1) |
|
|
1363 | (1) |
|
|
1364 | (1) |
|
|
1364 | (1) |
|
|
1364 | (1) |
|
A.6.48 UserDict, UserList, and UserString |
|
|
1365 | (1) |
|
|
1365 | (1) |
|
|
1365 | (1) |
|
A.6.51 xml.etree.ElementTree |
|
|
1365 | (1) |
|
|
1365 | (2) |
Appendix B: Outside of the Standard Library |
|
1367 | (6) |
|
|
1367 | (1) |
|
|
1367 | (1) |
|
|
1368 | (1) |
|
|
1368 | (1) |
|
B.5 Data Persistence and Exchange |
|
|
1368 | (1) |
|
|
1369 | (1) |
|
B.7 Concurrency with Processes, Threads, and Coroutines |
|
|
1369 | (1) |
|
|
1369 | (1) |
|
|
1370 | (1) |
|
B.10 Application Building Blocks |
|
|
1370 | (1) |
|
|
1371 | (2) |
Index of Python Modules |
|
1373 | |
Index |
|
13759781496377258 | (934850647) |
Unit 1: The Aging Experience |
|
1 | (72) |
|
|
2 | (9) |
|
Views of Older Adults Through History |
|
|
3 | (1) |
|
Characteristics of the Older Adult Population |
|
|
3 | (3) |
|
Population Growth and Increasing Life Expectancy |
|
|
4 | (1) |
|
Marital Status and Living Arrangements |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (2) |
|
|
7 | (1) |
|
Implications of an Aging Population |
|
|
8 | (3) |
|
Impact of the Baby Boomers |
|
|
8 | (1) |
|
Provision of and Payment for Services |
|
|
9 | (2) |
|
|
11 | (13) |
|
Biological Theories of Aging |
|
|
12 | (4) |
|
|
13 | (1) |
|
|
14 | (2) |
|
Sociologic Theories of Aging |
|
|
16 | (2) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (1) |
|
Age Stratification Theory |
|
|
17 | (1) |
|
Psychological Theories of Aging |
|
|
18 | (1) |
|
|
18 | (1) |
|
|
18 | (1) |
|
Nursing Theories of Aging |
|
|
18 | (1) |
|
Functional Consequences Theory |
|
|
18 | (1) |
|
|
19 | (1) |
|
Theory of Successful Aging |
|
|
19 | (1) |
|
Applying Theories of Aging to Nursing Practice |
|
|
19 | (5) |
|
|
24 | (13) |
|
Increasing Diversity of the Older Adult Population |
|
|
25 | (1) |
|
Overview of Diverse Groups of Older Adults in the United States |
|
|
25 | (7) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
28 | (2) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
Gay, Lesbian, Bisexual, and Transgender Older Adults |
|
|
32 | (1) |
|
Nursing Considerations for Culturally Sensitive Care of Older Adults |
|
|
32 | (5) |
|
4 Life Transitions and Story |
|
|
37 | (17) |
|
|
38 | (1) |
|
Changes in Family Roles and Relationships |
|
|
38 | (3) |
|
|
39 | (1) |
|
|
39 | (2) |
|
|
41 | (1) |
|
|
42 | (2) |
|
|
42 | (1) |
|
|
43 | (1) |
|
Changes in Health and Functioning |
|
|
44 | (1) |
|
Cumulative Effects of Life Transitions |
|
|
45 | (2) |
|
|
45 | (1) |
|
|
46 | (1) |
|
Responding to Life Transitions |
|
|
47 | (7) |
|
Life Review and Life Story |
|
|
47 | (1) |
|
|
48 | (2) |
|
Strengthening Inner Resources |
|
|
50 | (4) |
|
|
54 | (19) |
|
|
55 | (12) |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
63 | (2) |
|
|
65 | (1) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
|
68 | (1) |
|
Nursing Implications of Age-Related Changes |
|
|
68 | (5) |
Unit 2: Foundations Of Gerontological Nursing |
|
73 | (68) |
|
6 The Specialty of Gerontological Nursing |
|
|
74 | (17) |
|
Development of Gerontological Nursing |
|
|
75 | (2) |
|
Core Elements of Gerontological Nursing Practice |
|
|
77 | (4) |
|
|
77 | (1) |
|
|
77 | (1) |
|
|
77 | (1) |
|
|
78 | (3) |
|
Gerontological Nursing Roles |
|
|
81 | (2) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
82 | (1) |
|
|
83 | (1) |
|
|
83 | (1) |
|
Advanced Practice Nursing Roles |
|
|
83 | (1) |
|
|
83 | (2) |
|
Following Positive Health Care Practices |
|
|
83 | (1) |
|
Strengthening and Building Connections |
|
|
83 | (2) |
|
Committing to a Dynamic Process |
|
|
85 | (1) |
|
The Future of Gerontological Nursing |
|
|
85 | (6) |
|
Utilize Evidence-Based Practices |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
Balance Quality Care and Health Care Costs |
|
|
88 | (3) |
|
7 Holistic Assessment and Care Planning |
|
|
91 | (14) |
|
Holistic Gerontological Care |
|
|
92 | (1) |
|
Holistic Assessment of Needs |
|
|
92 | (3) |
|
Health Promotion-Related Needs |
|
|
93 | (1) |
|
Health Challenges-Related Needs |
|
|
94 | (1) |
|
|
94 | (1) |
|
Gerontological Nursing Processes |
|
|
95 | (1) |
|
|
95 | (7) |
|
Applying the Holistic Model: The Case of Mrs. D |
|
|
96 | (6) |
|
|
102 | (3) |
|
|
102 | (3) |
|
8 Legal Aspects of Gerontological Nursing |
|
|
105 | (12) |
|
Laws Governing Gerontological Nursing Practice |
|
|
106 | (1) |
|
Legal Risks in Gerontological Nursing |
|
|
106 | (8) |
|
|
106 | (3) |
|
|
109 | (1) |
|
|
109 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (1) |
|
Do Not Resuscitate Orders |
|
|
112 | (1) |
|
Advance Directives and Issues Related to Death and Dying |
|
|
112 | (2) |
|
|
114 | (1) |
|
Legal Safeguards for Nurses |
|
|
114 | (3) |
|
9 Ethical Aspects of Gerontological Nursing |
|
|
117 | (9) |
|
Philosophies Guiding Ethical Thinking |
|
|
118 | (1) |
|
|
118 | (2) |
|
External and Internal Ethical Standards |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
119 | (1) |
|
Ethical Dilemmas Facing Gerontological Nurses |
|
|
120 | (6) |
|
Changes Increasing Ethical Dilemmas for Nurses |
|
|
122 | (1) |
|
Measures to Help Nurses Make Ethical Decisions |
|
|
123 | (3) |
|
10 Continuum of Care in Gerontological Nursing |
|
|
126 | (15) |
|
Services in the Continuum of Care for Older Adults |
|
|
127 | (10) |
|
Supportive and Preventive Services |
|
|
128 | (3) |
|
Partial and Intermittent Care Services |
|
|
131 | (4) |
|
Complete and Continuous Care Services |
|
|
135 | (1) |
|
Complementary and Alternative Services |
|
|
136 | (1) |
|
Matching Services to Needs |
|
|
137 | (1) |
|
Settings and Roles for Gerontological Nurses |
|
|
137 | (4) |
Unit 3: Health Promotion |
|
141 | (110) |
|
11 Nutrition and Hydration |
|
|
142 | (14) |
|
Nutritional Needs of Older Adults |
|
|
143 | (4) |
|
Quantity and Quality of Caloric Needs |
|
|
143 | (3) |
|
|
146 | (1) |
|
|
147 | (1) |
|
Hydration Needs of Older Adults |
|
|
147 | (1) |
|
|
148 | (1) |
|
Threats to Good Nutrition |
|
|
149 | (1) |
|
Indigestion and Food Intolerance |
|
|
149 | (2) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
150 | (1) |
|
|
150 | (1) |
|
Addressing Nutritional Status and Hydration in Older Adults |
|
|
151 | (5) |
|
|
156 | (10) |
|
Age-Related Changes in Sleep |
|
|
157 | (1) |
|
Circadian Sleep-Wake Cycles |
|
|
157 | (1) |
|
|
157 | (1) |
|
Sleep Efficiency and Quality |
|
|
157 | (1) |
|
|
158 | (2) |
|
|
158 | (1) |
|
Nocturnal Myoclonus and Restless Legs Syndrome |
|
|
159 | (1) |
|
|
159 | (1) |
|
Medical Conditions That Affect Sleep |
|
|
159 | (1) |
|
|
160 | (1) |
|
Other Factors Affecting Sleep |
|
|
160 | (1) |
|
Promoting Rest and Sleep in Older Adults |
|
|
160 | (6) |
|
Pharmacologic Measures to Promote Sleep |
|
|
160 | (1) |
|
Nonpharmacologic Measures to Promote Sleep |
|
|
161 | (2) |
|
|
163 | (3) |
|
13 Comfort and Pain Management |
|
|
166 | (11) |
|
|
167 | (1) |
|
Pain: A Complex Phenomenon |
|
|
167 | (1) |
|
Prevalence of Pain in Older Adults |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (1) |
|
Effects of Unrelieved Pain |
|
|
168 | (1) |
|
|
168 | (2) |
|
An Integrative Approach to Pain Management |
|
|
170 | (7) |
|
|
170 | (3) |
|
|
173 | (1) |
|
|
173 | (1) |
|
|
174 | (3) |
|
|
177 | (20) |
|
Aging and Risks to Safety |
|
|
178 | (1) |
|
Importance of the Environment to Health and Wellness |
|
|
178 | (2) |
|
Impact of Aging on Environmental Safety and Function |
|
|
180 | (7) |
|
|
182 | (1) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
185 | (1) |
|
Psychosocial Considerations |
|
|
186 | (1) |
|
|
187 | (3) |
|
|
187 | (1) |
|
Risks Associated With Restraints |
|
|
188 | (2) |
|
Interventions to Reduce Intrinsic Risks to Safety |
|
|
190 | (7) |
|
Reducing Hydration and Nutrition Risks |
|
|
190 | (1) |
|
Addressing Risks Associated With Sensory Deficits |
|
|
191 | (1) |
|
Addressing Risks Associated With Mobility Limitations |
|
|
191 | (1) |
|
Monitoring Body Temperature |
|
|
192 | (1) |
|
|
192 | (1) |
|
Suggesting Sensible Clothing |
|
|
192 | (1) |
|
Using Medications Cautiously |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
193 | (1) |
|
Promoting Early Detection of Problems |
|
|
193 | (1) |
|
Addressing Risks Associated With Functional Impairment |
|
|
194 | (3) |
|
|
197 | (10) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
Assessing Spiritual Needs |
|
|
199 | (1) |
|
Addressing Spiritual Needs |
|
|
200 | (7) |
|
|
200 | (1) |
|
Honoring Beliefs and Practices |
|
|
200 | (1) |
|
Providing Opportunities for Solitude |
|
|
200 | (3) |
|
|
203 | (1) |
|
Assisting in Discovering Meaning in Challenging Situations |
|
|
204 | (1) |
|
Facilitating Religious Practices |
|
|
204 | (1) |
|
|
204 | (3) |
|
16 Sexuality and Intimacy |
|
|
207 | (17) |
|
Attitudes toward Sex and Older Adults |
|
|
208 | (1) |
|
Realities of Sex in Older Adulthood |
|
|
209 | (1) |
|
Sexual Behavior and Roles |
|
|
209 | (1) |
|
|
210 | (1) |
|
Age-Related Changes and Sexual Response |
|
|
210 | (1) |
|
Menopause as a Journey to Inner Connection |
|
|
210 | (4) |
|
Symptom Management and Patient Education |
|
|
212 | (1) |
|
|
213 | (1) |
|
|
214 | (1) |
|
Identifying Barriers to Sexual Activity |
|
|
214 | (6) |
|
Unavailability of a Partner |
|
|
215 | (1) |
|
|
215 | (3) |
|
|
218 | (1) |
|
|
218 | (2) |
|
Medication Adverse Effects |
|
|
220 | (1) |
|
|
220 | (1) |
|
Promoting Healthy Sexual Function |
|
|
220 | (4) |
|
|
224 | (27) |
|
Effects of Aging on Medication Use |
|
|
225 | (5) |
|
Polypharmacy and Interactions |
|
|
225 | (3) |
|
|
228 | (2) |
|
|
230 | (1) |
|
Increased Risk of Adverse Reactions |
|
|
230 | (1) |
|
Promoting the Safe Use of Drugs |
|
|
230 | (5) |
|
Avoiding Potentially Inappropriate Drugs: Beers Criteria |
|
|
230 | (1) |
|
Reviewing Necessity and Effectiveness of Prescribed Drugs |
|
|
230 | (3) |
|
Promoting Safe and Effective Administration |
|
|
233 | (1) |
|
Providing Patient Teaching |
|
|
234 | (1) |
|
Monitoring Laboratory Values |
|
|
235 | (1) |
|
|
235 | (1) |
|
|
236 | (16) |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
238 | (1) |
|
|
239 | (1) |
|
Antidiabetic (Hypoglycemic) Drugs |
|
|
240 | (1) |
|
|
240 | (1) |
|
Nonsteroidal Anti-inflammatory Drugs |
|
|
241 | (1) |
|
Cholesterol-Lowering Drugs |
|
|
242 | (1) |
|
Cognitive Enhancing Drugs |
|
|
243 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
245 | (6) |
Unit 4: Geriatric Care |
|
251 | (204) |
|
|
252 | (16) |
|
Effects of Aging on Respiratory Health |
|
|
253 | (1) |
|
Respiratory Health Promotion |
|
|
253 | (4) |
|
Selected Respiratory Conditions |
|
|
257 | (5) |
|
Chronic Obstructive Pulmonary Disease |
|
|
257 | (3) |
|
|
260 | (1) |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
262 | (1) |
|
General Nursing Considerations for Respiratory Conditions |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
262 | (1) |
|
Ensuring Safe Oxygen Administration |
|
|
263 | (5) |
|
Performing Postural Drainage |
|
|
263 | (1) |
|
Promoting Productive Coughing |
|
|
264 | (1) |
|
Using Complementary Therapies |
|
|
264 | (1) |
|
|
265 | (1) |
|
|
266 | (2) |
|
|
268 | (24) |
|
Effects of Aging on Cardiovascular Health |
|
|
269 | (1) |
|
Cardiovascular Health Promotion |
|
|
269 | (3) |
|
|
270 | (1) |
|
|
271 | (1) |
|
Cigarette Smoke Avoidance |
|
|
271 | (1) |
|
|
271 | (1) |
|
|
271 | (1) |
|
Cardiovascular Disease and Women |
|
|
272 | (1) |
|
Selected Cardiovascular Conditions |
|
|
272 | (13) |
|
|
272 | (5) |
|
|
277 | (1) |
|
|
277 | (1) |
|
|
278 | (2) |
|
|
280 | (1) |
|
|
281 | (1) |
|
|
282 | (1) |
|
Peripheral Vascular Disease |
|
|
282 | (3) |
|
General Nursing Considerations for Cardiovascular Conditions |
|
|
285 | (7) |
|
|
285 | (1) |
|
Keeping the Patient Informed |
|
|
285 | (1) |
|
|
285 | (1) |
|
|
286 | (1) |
|
|
287 | (1) |
|
Managing Problems Associated With Peripheral Vascular Disease |
|
|
287 | (1) |
|
|
288 | (1) |
|
Integrating Complementary Therapies |
|
|
288 | (4) |
|
20 Digestion and Bowel Elimination |
|
|
292 | (15) |
|
Effects of Aging on Gastrointestinal Health |
|
|
293 | (1) |
|
Gastrointestinal Health Promotion |
|
|
293 | (4) |
|
Selected Gastrointestinal Conditions and Related Nursing Considerations |
|
|
297 | (10) |
|
|
297 | (1) |
|
|
297 | (1) |
|
|
298 | (1) |
|
|
299 | (1) |
|
|
299 | (1) |
|
|
299 | (1) |
|
|
300 | (1) |
|
|
301 | (1) |
|
|
301 | (1) |
|
|
302 | (1) |
|
|
303 | (1) |
|
|
303 | (1) |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
305 | (1) |
|
|
305 | (1) |
|
|
305 | (2) |
|
|
307 | (12) |
|
Effects of Aging on Urinary Elimination |
|
|
308 | (1) |
|
Urinary System Health Promotion |
|
|
309 | (2) |
|
Selected Urinary Conditions |
|
|
311 | (5) |
|
|
311 | (1) |
|
|
312 | (4) |
|
|
316 | (1) |
|
|
316 | (1) |
|
|
316 | (1) |
|
General Nursing Considerations for Urinary Conditions |
|
|
316 | (3) |
|
22 Reproductive System Health |
|
|
319 | (9) |
|
Effects of Aging on the Reproductive System |
|
|
320 | (1) |
|
Reproductive System Health Promotion |
|
|
320 | (1) |
|
Selected Reproductive System Conditions |
|
|
320 | (8) |
|
Problems of the Female Reproductive System |
|
|
320 | (4) |
|
Problems of the Male Reproductive System |
|
|
324 | (4) |
|
|
328 | (24) |
|
Effects of Aging on Musculoskeletal Function |
|
|
329 | (1) |
|
Musculoskeletal Health Promotion |
|
|
329 | (9) |
|
Promotion of Physical Exercise in All Age Groups |
|
|
329 | (2) |
|
Exercise Programs Tailored for Older Adults |
|
|
331 | (2) |
|
|
333 | (3) |
|
|
336 | (2) |
|
|
338 | (1) |
|
Selected Musculoskeletal Conditions |
|
|
338 | (10) |
|
|
338 | (4) |
|
|
342 | (2) |
|
|
344 | (1) |
|
|
345 | (1) |
|
|
346 | (1) |
|
|
346 | (2) |
|
General Nursing Considerations for Musculoskeletal Conditions |
|
|
348 | (4) |
|
|
348 | (1) |
|
|
348 | (1) |
|
|
349 | (3) |
|
|
352 | (12) |
|
Effects of Aging on the Nervous System |
|
|
353 | (1) |
|
Neurologic Health Promotion |
|
|
353 | (3) |
|
Selected Neurologic Conditions |
|
|
356 | (5) |
|
|
356 | (1) |
|
Transient Ischemic Attacks |
|
|
357 | (1) |
|
Cerebrovascular Accidents |
|
|
358 | (3) |
|
General Nursing Considerations for Neurologic Conditions |
|
|
361 | (3) |
|
|
361 | (1) |
|
|
361 | (3) |
|
|
364 | (14) |
|
Effects of Aging on Vision and Hearing |
|
|
365 | (1) |
|
|
365 | (3) |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
366 | (2) |
|
Selected Vision and Hearing Conditions and Related Nursing Interventions |
|
|
368 | (8) |
|
|
368 | (6) |
|
|
374 | (2) |
|
General Nursing Considerations for Visual and Hearing Deficits |
|
|
376 | (2) |
|
|
378 | (12) |
|
Effects of Aging on Endocrine Function |
|
|
379 | (1) |
|
Selected Endocrine Conditions and Related Nursing Considerations |
|
|
379 | (11) |
|
|
379 | (8) |
|
|
387 | (1) |
|
|
387 | (3) |
|
|
390 | (11) |
|
Effects of Aging on the Skin |
|
|
391 | (1) |
|
|
391 | (1) |
|
|
392 | (6) |
|
|
392 | (1) |
|
|
393 | (1) |
|
|
394 | (1) |
|
|
394 | (1) |
|
|
395 | (1) |
|
|
396 | (2) |
|
General Nursing Considerations for Skin Conditions |
|
|
398 | (3) |
|
|
398 | (1) |
|
Using Alternative Therapies |
|
|
399 | (2) |
|
|
401 | (9) |
|
|
402 | (1) |
|
Unique Challenges for Older Persons With Cancer |
|
|
402 | (1) |
|
Explanations for Increased Incidence in Old Age |
|
|
402 | (1) |
|
Risk Factors, Prevention, and Screening |
|
|
402 | (2) |
|
|
404 | (2) |
|
|
404 | (1) |
|
Complementary and Alternative Medicine |
|
|
405 | (1) |
|
Nursing Considerations for Older Adults With Cancer |
|
|
406 | (4) |
|
Providing Patient Education |
|
|
406 | (1) |
|
|
406 | (1) |
|
Providing Support to Patients and Families |
|
|
406 | (4) |
|
29 Mental Health Disorders |
|
|
410 | (17) |
|
|
411 | (1) |
|
Promoting Mental Health in Older Adults |
|
|
411 | (1) |
|
Selected Mental Health Conditions |
|
|
412 | (9) |
|
|
412 | (6) |
|
|
418 | (1) |
|
|
419 | (1) |
|
|
420 | (1) |
|
Nursing Considerations for Mental Health Conditions |
|
|
421 | (6) |
|
|
421 | (1) |
|
Promoting a Positive Self-Concept |
|
|
421 | (1) |
|
Managing Behavioral Problems |
|
|
421 | (6) |
|
|
427 | (15) |
|
|
428 | (3) |
|
|
431 | (11) |
|
|
431 | (3) |
|
|
434 | (1) |
|
Caring for Persons With Dementia |
|
|
435 | (7) |
|
31 Living in Harmony With Chronic Conditions |
|
|
442 | (13) |
|
Chronic Conditions and Older Adults |
|
|
443 | (1) |
|
|
443 | (3) |
|
Assessment of Chronic Care Needs |
|
|
446 | (1) |
|
Maximizing the Benefits of Chronic Care |
|
|
447 | (3) |
|
Selecting an Appropriate Physician |
|
|
447 | (1) |
|
Using a Chronic Care Coach |
|
|
447 | (1) |
|
|
448 | (1) |
|
|
448 | (1) |
|
Making Smart Lifestyle Choices |
|
|
448 | (1) |
|
Using Complementary and Alternative Therapies |
|
|
448 | (2) |
|
Factors Affecting the Course of Chronic Care |
|
|
450 | (1) |
|
Defense Mechanisms and Implications |
|
|
450 | (1) |
|
|
450 | (1) |
|
Impact of Ongoing Care on the Family |
|
|
451 | (1) |
|
The Need for Institutional Care |
|
|
451 | (1) |
|
Chronic Care: A Nursing Challenge |
|
|
451 | (4) |
Unit 5: Settings And Special Issues In Geriatric Care |
|
455 | (70) |
|
32 Rehabilitative and Restorative Care |
|
|
456 | (17) |
|
Rehabilitative and Restorative Care |
|
|
457 | (1) |
|
|
458 | (1) |
|
Importance of Attitude and Coping Capacity |
|
|
458 | (1) |
|
Losses Accompanying Disability |
|
|
458 | (1) |
|
Principles of Rehabilitative Nursing |
|
|
459 | (1) |
|
|
459 | (2) |
|
Interventions to Facilitate and Improve Functioning |
|
|
461 | (12) |
|
Facilitating Proper Positioning |
|
|
461 | (1) |
|
Assisting With Range-of-Motion Exercises |
|
|
461 | (1) |
|
Assisting With Mobility Aids and Assistive Technology |
|
|
462 | (4) |
|
Teaching About Bowel and Bladder Training |
|
|
466 | (3) |
|
Maintaining and Promoting Mental Function |
|
|
469 | (1) |
|
Using Community Resources |
|
|
470 | (3) |
|
|
473 | (14) |
|
Risks Associated With Hospitalization of Older Adults |
|
|
474 | (1) |
|
|
475 | (3) |
|
Special Risks for Older Adults |
|
|
475 | (1) |
|
Preoperative Care Considerations |
|
|
475 | (2) |
|
Operative and Postoperative Care Considerations |
|
|
477 | (1) |
|
|
478 | (4) |
|
|
482 | (1) |
|
Discharge Planning for Older Adults |
|
|
483 | (4) |
|
|
487 | (13) |
|
Development of Long-Term Institutional Care |
|
|
488 | (2) |
|
|
488 | (1) |
|
|
488 | (1) |
|
Lessons to Be Learned From History |
|
|
489 | (1) |
|
|
490 | (5) |
|
|
490 | (1) |
|
|
490 | (3) |
|
Nursing Roles and Responsibilities |
|
|
493 | (2) |
|
Other Settings for Long-Term Care |
|
|
495 | (1) |
|
Assisted Living Communities |
|
|
495 | (1) |
|
Community-Based and Home Health Care |
|
|
495 | (1) |
|
Looking Forward: A New Model of Long-Term Care |
|
|
496 | (4) |
|
|
500 | (11) |
|
|
501 | (2) |
|
Identification of Family Members |
|
|
501 | (1) |
|
|
501 | (1) |
|
Family Dynamics and Relationships |
|
|
502 | (1) |
|
Scope of Family Caregiving |
|
|
503 | (1) |
|
|
504 | (1) |
|
Protecting the Health of the Older Adult and Caregiver |
|
|
505 | (2) |
|
Family Dysfunction and Abuse |
|
|
507 | (1) |
|
Rewards of Family Caregiving |
|
|
508 | (3) |
|
|
511 | (14) |
|
|
512 | (1) |
|
Family Experience With the Dying Process |
|
|
512 | (1) |
|
Supporting the Dying Individual |
|
|
513 | (8) |
|
Stages of the Dying Process and Related Nursing Interventions |
|
|
514 | (3) |
|
Rational Suicide and Assisted Suicide |
|
|
517 | (1) |
|
|
518 | (1) |
|
|
519 | (1) |
|
|
520 | (1) |
|
|
520 | (1) |
|
Supporting Family and Friends |
|
|
521 | (1) |
|
Supporting Through the Stages of the Dying Process |
|
|
521 | (1) |
|
Helping Family and Friends After a Death |
|
|
522 | (1) |
|
|
522 | (3) |
Index |
|
525 | |