[Tutor] Re: Tutor digest, Vol 1 #1146 - 11 msgs

Rick Pasotto rick@niof.net
Thu, 18 Oct 2001 12:17:38 -0400


On Thu, Oct 18, 2001 at 10:43:30AM -0500, BackupAdmin wrote:
> 
> #!/usr/bin/python
> import MySQLdb
> argggh = MySQLdb.connect('localhost', 'eval', 'abrakadabra')
> cursor = argggh.cursor

This should be:

cursor = arggh.cursor()

You need to *call* (which is what the parentheses does) the 'cursor'
method of the 'argggh' instance instead of just assigning it to a
variable.

-- 
Our doctrine is based on private property. Communism is based on
systematic plunder, since it consists in handing over to one man,
without compensation, the labor of another. If it distributed to
each one according to his labor, it would, in fact, recognize
private property and would no longer be communism.
	-- Frédéric Bastiat (1801-1850)
    Rick Pasotto    rickp@telocity.com    http://www.niof.net