#!/usr/bin/env python # Filename: finally.py import time try: f=file('poem.txt') while True: # our usual file-reading idiom line=f.readline() if len(line)==0: break time.sleep(2) print line, finally: f.close() print 'Cleaning up...closed the file'
<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            ÑÇÖÞÅ·ÃÀÔÚÏß