MySQLdb trouble
John Salerno
johnjsal at NOSPAMgmail.com
Wed May 10 10:02:31 EDT 2006
Nicolay A. Vasiliev wrote:
> def loc_connect_db():
> """
> The DB connection subroutine
> """
> db = MySQLdb.connect(host = "localhost",
> user = "root",
> passwd="mysql",
> db="some_db")
> return db
Hi. Sorry I can't help, but I'm interested in learning about mysqldb and
I was wondering why you chose to wrap the 'connect' function inside your
own function. Does this accomplish something that I'm not seeing?
Couldn't you just use the body of the loc_connect_db() function as your
actual code in order to get 'db'?
Thanks.
More information about the Python-list
mailing list