June 2002
Beginner to intermediate
640 pages
14h 24m
English
Terms in This Chapter
Class instance
Comment
Data persistence
Data structure
Document string
Dump
File
File object
File pointer
for, if, and while statements
for loop
Java Virtual Machine
Method
Mode
newline
Object instance
pickle module
Scaffolding
try … except
try … finally
while loop
I've written programs that read and write data from files in Java, Delphi, Visual Basic, C++, and C. None have such a straightforward and easy approach to dealing with files as Python's. In this chapter we'll be covering file input and output, which is important for saving data. First we'll cover simple I/O; later we'll deal with persisting class instances.
Writing a program that resides only in memory is good for illustration, but eventually you'll ...
Read now
Unlock full access