As a rule, I tend to open and close a connection based on what I'm doing with the database. If I were to directly run a series of queries one after another, I would keep it open until a change in interface (referring to changes in objects, both masters and slaves). Also, you can perform any query that does not change any records safely without a commit, for example, searches. For everything else, you need to call commit - but you don't need to close the connection.
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
