file opening and closing

hokieghal99 hokiegal99 at hotmail.com
Wed Dec 24 10:33:45 EST 2003


jpg = string.find(file(os.path.join(root,fname), 'rb').read(), 'JFIF')

Should this file be closed after reading? If so, how would one close it?
What's the downside to not closing it?





More information about the Python-list mailing list