[Tutor] Why this error ?

Mário Gamito gamito at gmail.com
Thu Feb 1 00:33:23 CET 2007


Hi,

> Your indentation is wrong.  Try outdenting all your code so it all
> starts in the same column, and see if that helps.
Ok, now i have:

import MySQLdb

conn = MySQLdb.connect('host' = "localhost", 'user' = "testuser", 
'passwd' = "testpass", 'db' = "test")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()

but the problem remains :-(

Any ideas ?

Warm Regards,
Mário Gamito


More information about the Tutor mailing list