Python's with Statement: Manage External Resources Safely (Sample Code) – Real Python