From: <ian...@us...> - 2003-11-05 08:27:06
|
Update of /cvsroot/webware-sandbox/Sandbox/ianbicking/WebKit/MiscUtils/Examples In directory sc8-pr-cvs1:/tmp/cvs-serv27696/MiscUtils/Examples Added Files: DBPool.py Log Message: Added WebKit-Standalone project. --- NEW FILE: DBPool.py --- from ExamplePage import ExamplePage import MySQLdb class DB(ExamplePage): def writeContent(self): self.writeln('<P>Welcome to the DBPool example!</P>') pool = self.getCan('DBPoolCan', 'DBPool', 'application', MySQLdb, 5, host='localhost', user='test', passwd='test', db='test') con = pool.getConnection() cursor = con.cursor() cursor.execute("select name from test") for name in cursor.fetchall(): self.writeln('%s<br>' % name) db.close() |