In article <mailman.1225.1356296379.29569.python-l...@python.org>, prilisa...@googlemail.com wrote:
> Thanks to all your answers, I have read a lot about namespaces, but still > there's something I do not understood. I have tried your example but as I > expected: > > line 13, in HandoverSQLCursor > curs.execute("SELECT * FROM lager") > AttributeError: 'builtin_function_or_method' object has no attribute > 'execute' > > I will try my best to write tomorrow a sample as detailed as possible. > > Good evening Polishing up my crystal ball, I'm going to guess you're using one of the Python Database APIs (http://www.python.org/dev/peps/pep-0249/). And that at some point, you tried to generate a cursor by doing: curs = connection.cursor instead of curs = connection.cursor() This left you with curs being (a reference to) the cursor function itself, rather than what the function returns when it's called. You own the oracle 20 minutes spent reading ESR's classic essay, "How To Ask Questions The Smart Way" (http://tinyurl.com/cabqnop). -- http://mail.python.org/mailman/listinfo/python-list