debug messages

130 views
Skip to first unread message

mIREK

unread,
Feb 17, 2012, 5:38:33 PM2/17/12
to PyMySQL Users
Hi,

I am quite new to Python, I have been looking for some Python Mysql
Connector which worked on Python2.x and also 3.x in the last two
years. Few month ago I have found pymysql, which works fine on both
version of Python...

I am doing some CLI scripts which are running for many hours/days and
I would like to see, what SQL statements are done, any debug messages.
I have found that there's any DEBUG variable inside which is probably
doing that, but I have not found any possibility to get to this
variable from outside of the module... Nothing like DEBUG = True or
pymysql.DEBUG = True is not working... Is that possible somehow?

Thanks

Pete Hunt

unread,
Feb 19, 2012, 7:03:25 PM2/19/12
to pymysq...@googlegroups.com
I think you can do:

from pymysql import connections

connections.DEBUG = True

Reply all
Reply to author
Forward
0 new messages