Mysqldb & stderr

M

mastro.francesco

developing a daemon (using python 2.4 and mysqldb 1.2.1_p2) we notes
that mysqldb class write on stderr some warnings and error
asyncronously (uhmmm.... it's good written? ;P ).
If stderr is closed these function raise up an I/O error (obviously).
We spent a lot of time to understand
for now we redirected stderr on /dev/null, but.. it's a workaround.

Someone knows how stop write on stderr (and stdout) on mysqldb?


Thanks.
 
J

jean-michel bain-cornu

Hi,
developing a daemon (using python 2.4 and mysqldb 1.2.1_p2) we notes
that mysqldb class write on stderr some warnings and error
asyncronously (uhmmm.... it's good written? ;P ).

Someone knows how stop write on stderr (and stdout) on mysqldb?

I use warnings filter :
...
import warnings
warnings.filterwarnings('ignore')
import MySQLdb
...
May be it can be helpful to you.
Regards,
jm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top