Over time, I’ve found myself less and less willing to close things manually in Python: ever since I found out about context managers and the with statement, I find myself writing context managers to handle any managed resource I need to deal with.