Lichen

Annotated tests/read_file.py

843:d305986d05c8
2018-07-05 Paul Boddie Employed sets for attributes and providers referenced by accesses. This causes various attributes to be identified definitively in the access plans and instruction sequences.
paul@347 1
try:
paul@347 2
    f = open("tests/read_file.py")  # this file!
paul@347 3
except IOError, exc:
paul@347 4
    print "I/O error occurred:", exc.value
paul@347 5
    raise
paul@347 6
paul@347 7
try:
paul@347 8
    s = f.read(5)
paul@347 9
    print s                         # try:
paul@347 10
    s = f.read(49)
paul@347 11
    print s                         #     f = open("tests/read_file.py")   # this file!
paul@436 12
    s = f.readline()
paul@436 13
    print s                         # except IOError, exc:
paul@347 14
    s = f.read()
paul@347 15
    print s
paul@347 16
finally:
paul@347 17
    f.close()