ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
Re: [Tutor] TypeError with _mysql module.result.num_rows()
by Lloyd Kvam other posts by this author
Sep 2 2003 1:32PM messages near this date
[Tutor] test | [Tutor] Compiling Python to Native Machine Code
This sequence of commands worked for me.

Does this query work when using the Python DBI (version 2)?
http://www.python.org/peps/pep-0249.html
PEP 249 -- Python Database API Specification v2.0
You'd be importing MySQLdb which wraps the _mysql module with the python
classes to support the standard DB interface.

Jozsa Boti wrote:

>  Hi,
>   
>  Why do I get a
>  TypeError: function takes no arguments
>  error for a call to num_rows() method of a result object in _mysql module?
>  My usage is:
>   
>  import _mysql
>  db = _mysql.connect()
>  db.query("""show table status""")
>  res = db.store_result()
>  nrws = res.num_rows()
>   
>  and the error message is:
>   
>  Traceback (most recent call last):
>    File "<interactive input>", line 1, in ?
>  TypeError: function takes no arguments
>  
>  
>  ------------------------------------------------------------------------
>  
>  _______________________________________________
>  Tutor maillist  -  Tutor@[...].org
>  http://mail.python.org/mailman/listinfo/tutor

-- 
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice:	603-443-6155
fax:	801-459-9582


_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved