Re: sqlite3 with context manager

2011-09-06 Thread Tim Arnold
On 9/3/2011 3:03 AM, Carl Banks wrote: On Friday, September 2, 2011 11:43:53 AM UTC-7, Tim Arnold wrote: Hi, I'm using the 'with' context manager for a sqlite3 connection: with sqlite3.connect(my.database,timeout=10) as conn: conn.execute('update config_build set datetime=?,result

Re: sqlite3 with context manager

2011-09-03 Thread Carl Banks
On Friday, September 2, 2011 11:43:53 AM UTC-7, Tim Arnold wrote: > Hi, > I'm using the 'with' context manager for a sqlite3 connection: > > with sqlite3.connect(my.database,timeout=10) as conn: > conn.execute('update config_build set datetime=?,result=? > where id=?', >

Re: sqlite3 with context manager

2011-09-02 Thread Ian Kelly
On Fri, Sep 2, 2011 at 12:43 PM, Tim Arnold wrote: > Hi, > I'm using the 'with' context manager for a sqlite3 connection: > > with sqlite3.connect(my.database,timeout=10) as conn: >            conn.execute('update config_build set datetime=?,result=? > where id=?', >                              (

sqlite3 with context manager

2011-09-02 Thread Tim Arnold
Hi, I'm using the 'with' context manager for a sqlite3 connection: with sqlite3.connect(my.database,timeout=10) as conn: conn.execute('update config_build set datetime=?,result=? where id=?', (datetime.datetime.now(), success, self.b['id'])) my question