Skip to Main Content
Python Programming: A modular approach
book

Python Programming: A modular approach

by Kumar Naveen, Taneja Sheetal
January 2017
Intermediate to advanced content levelIntermediate to advanced
606 pages
14h 1m
English
Pearson Education India
Content preview from Python Programming: A modular approach

CHAPTER 9

FILES AND EXCEPTIONS

CHAPER OUTLINE

9.1 File Handling

9.2 Writing Structures to a File

9.3 Errors and Exceptions

9.4 Handling Exceptions using try…except

9.5 File Processing Example

Programs that we have developed so far take data from the user in an interactive manner. Such data remain in memory only during the lifetime of the program. Often we want to store data permanently, in the form of files that usually reside on disks, so that it is available as and when required. For example, for login application, we would like to validate the user name and password entered by a user against the names and passwords of valid users stored permanently in a file. By default, Python provides a standard input file and a standard output file to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modular Programming with Python

Modular Programming with Python

Erik Westra
Python Programming Blueprints

Python Programming Blueprints

Daniel Furtado, Marcus Pennington

Publisher Resources

ISBN: 9789352866038