return to first page linux journal archive
keywordscontents

Listing 6. Opening a Read File

#! /usr/local/bin/python
import sys
try:
        fi = open('sample_+_file', 'r')
except IOError:
        print 'Can\'t open file for reading.'
        sys.exit(0)