Chapter 2. Files
- IntroductionRecipe 2.1.
Reading from a FileRecipe 2.2.
Writing to a FileRecipe 2.3.
Searching and Replacing Text in a FileRecipe 2.4.
Reading a Specific Line from a FileRecipe 2.5.
Counting Lines in a FileRecipe 2.6.
Processing Every Word in a FileRecipe 2.7.
Using Random-Access Input/OutputRecipe 2.8.
Updating a Random-Access FileRecipe 2.9.
Reading Data from zip FilesRecipe 2.10.
Handling a zip File Inside a StringRecipe 2.11.
Archiving a Tree of Files into a Compressed tar FileRecipe 2.12.
Sending Binary Data to Standard Output Under WindowsRecipe 2.13.
Using a C++-like iostream SyntaxRecipe 2.14.
Rewinding an Input File to the BeginningRecipe 2.15.
Adapting a File-like Object to a True File ObjectRecipe 2.16.
Walking Directory TreesRecipe 2.17.
Swapping One File Extension for Another Throughout a Directory TreeRecipe 2.18.
Finding a File Given a Search PathRecipe 2.19.
Finding Files Given a Search Path and a PatternRecipe 2.20.
Finding a File on the Python Search PathRecipe 2.21.
Dynamically Changing the PythonSearch PathRecipe 2.22.
Computing the Relative Path from One Directory to AnotherRecipe 2.23.
Reading an Unbuffered Character in a Cross-Platform WayRecipe 2.24.
Counting Pages of PDF Documents on Mac OS XRecipe 2.25.
Changing File Attributes on WindowsRecipe 2.26.
Extracting Text from OpenOffice.org DocumentsRecipe 2.27.
Extracting Text from Microsoft Word DocumentsRecipe 2.28.
File Locking Using a Cross-Platform APIRecipe 2.29.
Versioning FilenamesRecipe 2.30.
Calculating CRC-64 Cyclic Redundancy Checks