[prev in list] [next in list] [prev in thread] [next in thread]
List: py2exe-users
Subject: Re: [Py2exe-users] Removing the "Errors Occured" message box
From: Thomas Heller <theller () ctypes ! org>
Date: 2009-01-21 11:46:46
Message-ID: gl71v2$u98$1 () ger ! gmane ! org
[Download RAW message or body]
King Simon-NFHD78 schrieb:
>> -----Original Message-----
>> From: Leith Bade [mailto:leith.bade@silentone.com]
>> Sent: 21 January 2009 03:00
>> To: py2exe-users@lists.sourceforge.net
>> Subject: [Py2exe-users] Removing the "Errors Occured" message box
>>
>> Our python program has some DepreciationWarning generated and
>> thus it always triggers the "Errors Occured" message box.
>>
>> I would like to know how to disable this. I see it is created
>> in boot_common.py, but according to the py2exe relase notes,
>> the "custom-boot-script" option is only run afer
>> boot_common.py, so I can't replace boot_common.py with my own version.
>>
>> Leith Bade
>>
>
> As an alternative to hacking py2exe, could you use the python Warnings
> filter (http://docs.python.org/library/warnings.html) to disable the
> warnings that you aren't interested in?
>
> Something like this:
>
> import warnings
> warnings.simplefilter('ignore', DeprecationWarning)
A good approach. However, there is another solution that does not
require to 'hack' py2exe:
Assing something to sys.stderr that will do with the error and warning messages
whatever you want to be done with them.
Thomas
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic