Re: [wxPython-users] suppress warning messages

47 views
Skip to first unread message

Gadget/Steve

unread,
Nov 4, 2012, 2:44:47 AM11/4/12
to wxpytho...@googlegroups.com
On 04/11/2012 12:12 AM, Arek wrote:

Hi

I developed wxpython application for windows.  How can I suppress warning message.

I compiled the application using py2exe.  When the user exit the application, the warning message is sent to log file.

C:\Python27\lib\site-packages\matplotlib\lines.py:49: RuntimeWarning: invalid value encountered in greater_equal

  candidates = (u>=0) & (u<=1)

This is not the harmful warning in my application so I would like to keep it from popping up (send to log file)

 

Regards,

Arek

--
To unsubscribe, send email to wxPython-user...@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
Arek,

The best, (only good), way to suppress a warning message is to fix the problem that causes it.

Gadget/Steve

Werner

unread,
Nov 4, 2012, 4:45:26 AM11/4/12
to wxpytho...@googlegroups.com
Arek,

Totally agree with Steve, warning and error messages are best dealt with by correcting the code.

However if you are looking for ways to log log stuff to files/console/email ..... etc e.g. during development and suppress all that for a deployment version then you should look at the Python Logging module.

http://docs.python.org/2/library/logging.html
http://docs.python.org/2/howto/logging-cookbook.html
http://www.red-dove.com/python_logging.html

Werner
Reply all
Reply to author
Forward
0 new messages