From montanaro at users.sourceforge.net Fri Nov 6 01:46:46 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Fri, 06 Nov 2009 00:46:46 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3249] trunk/website/faq.txt Message-ID: Revision: 3249 http://spambayes.svn.sourceforge.net/spambayes/?rev=3249&view=rev Author: montanaro Date: 2009-11-06 00:46:45 +0000 (Fri, 06 Nov 2009) Log Message: ----------- whitespace Modified Paths: -------------- trunk/website/faq.txt Modified: trunk/website/faq.txt =================================================================== --- trunk/website/faq.txt 2009-02-23 07:22:54 UTC (rev 3248) +++ trunk/website/faq.txt 2009-11-06 00:46:45 UTC (rev 3249) @@ -51,20 +51,20 @@ SpamBayes is free and open-source - there is no charge. The software is released under `the PSF license`_. -If you really feel that your life would be incomplete without giving +If you really feel that your life would be incomplete without giving something back to the project, you have a few options: -* Donate your time to help improve the project. This includes many +* Donate your time to help improve the project. This includes many items that do not require much in the way of technical skills. See - the `I'm not a programmer but still want to help`_ question for more + the `I'm not a programmer but still want to help`_ question for more details. -* Donate money to the `Python Software Foundation`_. For more +* Donate money to the `Python Software Foundation`_. For more information, including why you would want to donate to the PSF, please see our `donations page`_. * Investigate some of the commercial `programs based on the SpamBayes code`_. - This should give you some additional benefits like support or greater + This should give you some additional benefits like support or greater ease-of-use. .. _the PSF license: http://spambayes.cvs.sourceforge.net/*checkout*/spambayes/spambayes/LICENSE.txt @@ -473,8 +473,8 @@ 10. Add the following two lines. Use whatever ports you assigned to pop3proxy and smtpproxy for the dominant personality:: - POPPort=1110 - SMTPPort=1115 + POPPort=1110 + SMTPPort=1115 11. Setting for other personalities are kept in sections beginning with ``[Persona-personality_name]``. For each personality make the same @@ -526,7 +526,7 @@ 10. In "Action" area, top drop-down box, select "Transfer to" -11. In target area immediately to the right, click, and select desired +11. In target area immediately to the right, click, and select desired target mailbox to match choice in 8. (On Mac OS X, you will be prompted to select a mailbox from the Transfer menu in the toolbar.) @@ -681,12 +681,12 @@ How can I configure SpamBayes to delete spam rather than moving it? ------------------------------------------------------------------- -Sorry, but you can't. However, Outlook has an excellent "auto-archive" +Sorry, but you can't. However, Outlook has an excellent "auto-archive" facility which can be used to the same effect - simply configure auto-archive to periodically delete your Spam folder. -It is recommended that you configure auto-archive to keep at least a -few days of Spam around, should the SpamBayes database become corrupt and +It is recommended that you configure auto-archive to keep at least a +few days of Spam around, should the SpamBayes database become corrupt and require you to perform a full re-train. @@ -699,7 +699,7 @@ the "from" address is generally forged so the receipt goes nowhere useful). The second common trick is by sending HTML spam that references unique URLs (generally images) on the spammer's server. -When this HTML message is rendered, the fetching of these URLs +When this HTML message is rendered, the fetching of these URLs identifies to the spammer the associated email address. As far as we are aware, SpamBayes does not generate a "read receipt" @@ -1522,7 +1522,7 @@ We're also told that ZoneAlarm are aware of the issue with their 5.x release and were working on it, but that it might be the next release before -they have it solved. +they have it solved. I get an error message "No filterable messages are selected". @@ -1549,8 +1549,8 @@ case). .. _appropriate SourceForge tracker: http://sourceforge.net/tracker/index.php?func=detail&aid=854547&group_id=61702&atid=498103 - + Messages don't move after clicking until I change folder -------------------------------------------------------- @@ -1584,8 +1584,8 @@ Are you using an Athlon 64 or Core 2 Duo with DEP? There are issues with DEP and Outlook with a SpamBayes-based plug-in. Listing Outlook as a safe application on these processors should "solve" the problem. - + Development =========== @@ -1693,8 +1693,8 @@ feeling about content differs - this is why it is a client end role that tools like SpamBayes fill. -If you really need whitelisting, consider implementing rules in your -mailer to intercept the messages before they're passed to SpamBayes. +If you really need whitelisting, consider implementing rules in your +mailer to intercept the messages before they're passed to SpamBayes. Open Source software is developed by people scratching their own itches (and it can't be otherwise, since nobody is paid to endure things they This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From montanaro at users.sourceforge.net Fri Nov 6 01:49:15 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Fri, 06 Nov 2009 00:49:15 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3250] trunk/spambayes/spambayes/dnscache.py Message-ID: Revision: 3250 http://spambayes.svn.sourceforge.net/spambayes/?rev=3250&view=rev Author: montanaro Date: 2009-11-06 00:49:15 +0000 (Fri, 06 Nov 2009) Log Message: ----------- another innocuous detail we can ignore Modified Paths: -------------- trunk/spambayes/spambayes/dnscache.py Modified: trunk/spambayes/spambayes/dnscache.py =================================================================== --- trunk/spambayes/spambayes/dnscache.py 2009-11-06 00:46:45 UTC (rev 3249) +++ trunk/spambayes/spambayes/dnscache.py 2009-11-06 00:49:15 UTC (rev 3250) @@ -253,7 +253,8 @@ reply = self.queryObj.req(queryQuestion, qtype=qType, timeout=self.dnsTimeout) except DNS.Base.DNSError,detail: - if detail.args[0] != "Timeout": + if detail.args[0] not in ("Timeout", "nothing to lookup"): + print >> sys.stderr, detail.args[0] print >> sys.stderr, "Error, fixme", detail print >> sys.stderr, "Question was", queryQuestion print >> sys.stderr, "Original question was", question This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From montanaro at users.sourceforge.net Fri Nov 6 02:19:47 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Fri, 06 Nov 2009 01:19:47 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3251] branches/python3/ Message-ID: Revision: 3251 http://spambayes.svn.sourceforge.net/spambayes/?rev=3251&view=rev Author: montanaro Date: 2009-11-06 01:19:47 +0000 (Fri, 06 Nov 2009) Log Message: ----------- base checkin for Python 3.x port Added Paths: ----------- branches/python3/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From montanaro at users.sourceforge.net Fri Nov 6 02:20:55 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Fri, 06 Nov 2009 01:20:55 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3252] branches/python3/website/ Message-ID: Revision: 3252 http://spambayes.svn.sourceforge.net/spambayes/?rev=3252&view=rev Author: montanaro Date: 2009-11-06 01:20:54 +0000 (Fri, 06 Nov 2009) Log Message: ----------- don't need the website dir on this branch Removed Paths: ------------- branches/python3/website/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From montanaro at users.sourceforge.net Mon Nov 9 03:30:04 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Mon, 09 Nov 2009 02:30:04 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3253] branches/python3/spambayes Message-ID: Revision: 3253 http://spambayes.svn.sourceforge.net/spambayes/?rev=3253&view=rev Author: montanaro Date: 2009-11-09 02:30:03 +0000 (Mon, 09 Nov 2009) Log Message: ----------- Tweak files which 2to3 can't parse. For the most part these are files which contain raw binary data. A couple involved complex map() calls. Modified Paths: -------------- branches/python3/spambayes/Outlook2000/dialogs/__init__.py branches/python3/spambayes/scripts/sb_server.py branches/python3/spambayes/spambayes/core_resources/classify_gif.py branches/python3/spambayes/spambayes/core_resources/config_gif.py branches/python3/spambayes/spambayes/core_resources/help_gif.py branches/python3/spambayes/spambayes/core_resources/message_gif.py branches/python3/spambayes/spambayes/core_resources/query_gif.py branches/python3/spambayes/spambayes/core_resources/status_gif.py branches/python3/spambayes/spambayes/core_resources/train_gif.py branches/python3/spambayes/spambayes/core_resources/ui_html.py branches/python3/spambayes/spambayes/core_resources/ui_psp.py branches/python3/spambayes/spambayes/dnscache.py branches/python3/spambayes/spambayes/languages/fr/i18n_ui_html.py branches/python3/spambayes/spambayes/resources/classify_gif.py branches/python3/spambayes/spambayes/resources/config_gif.py branches/python3/spambayes/spambayes/resources/help_gif.py branches/python3/spambayes/spambayes/resources/message_gif.py branches/python3/spambayes/spambayes/resources/query_gif.py branches/python3/spambayes/spambayes/resources/status_gif.py branches/python3/spambayes/spambayes/resources/train_gif.py branches/python3/spambayes/spambayes/resources/ui_html.py branches/python3/spambayes/spambayes/resources/ui_psp.py branches/python3/spambayes/windows/py2exe/gen_py/addin-designer.py branches/python3/spambayes/windows/py2exe/gen_py/office-9.py branches/python3/spambayes/windows/py2exe/gen_py/outlook-9.py Modified: branches/python3/spambayes/Outlook2000/dialogs/__init__.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/__init__.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/Outlook2000/dialogs/__init__.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -84,7 +84,7 @@ import dialog_map commands = dialog_map.dialog_map[idd] if not parent: - raise "Parent must be the tab control" + raise ValueError("Parent must be the tab control") import dlgcore dlg = dlgcore.ProcessorPage(parent, manager, config, idd, commands, yoffset) Modified: branches/python3/spambayes/scripts/sb_server.py =================================================================== --- branches/python3/spambayes/scripts/sb_server.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/scripts/sb_server.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -880,7 +880,8 @@ sc = get_pathname_option("Storage", "spam_cache") hc = get_pathname_option("Storage", "ham_cache") uc = get_pathname_option("Storage", "unknown_cache") - map(storage.ensureDir, [sc, hc, uc]) + for d in [sc, hc, uc]: + storage.ensureDir(d) if self.gzipCache: factory = GzipFileMessageFactory() else: Modified: branches/python3/spambayes/spambayes/core_resources/classify_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/classify_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/classify_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,26 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource classify_gif (from file classify.gif)""" # written by resourcepackage: (1, 0, 0) source = 'classify.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\xFE\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9CH\xB1\xA2?\022o\x98\xB8\xD0\xC0\000\x80\x8F\006\030\\(q\003\xE3\017\024\015>\ -\xAA\\\xB9\xB2\001\x8A\037\024]$\xF8\xD8@\004\x8D\023+\003<\030\021!\xC0\xC7\004-\"\xFA\xD0\xF0\xF1\001\x8C\x81>X\xF0\000\x92\xC3\004\002\005:n`\xF0\011 \x83\017\x87=\036\000\010@\xE2`J\ -\003\034t<\x88 \x90\006\x83\xA2;\030f?b ?\034TBE\xC0B\xA0\x8F\0134{,\xAC\xF01\005A\0072\006?\012\xA0\xC3\011\011\004\xE3\002\xA0\xA0\020\xC5G\014\005\005\xECx\020\ -B\007\020\012*\017\xEC @\xF0\x87\x84\x8F(\022\"\xF8X\x92 \000 \037\005\x8C\\\x89\xBA\xA0\x8D\x8F\010\022:\006 \xE1\xAD\xC0\0029F\xB3\004\xA0\x993A\xCC\000B'\xE4\013\x80\003\xC1\012'>\ -\xEC\006\xE0!\005\xE2\x81\xCA\027/\\\013\000\xC3U 0\020\x88e\xF9@\x87\x82\xBA\002\xA3p?\xD0;]+\000\0064\004Z\xE8\xEE\xE1\000o\017:*\x90\005\xA2\xE33\x80\xF1\016\020?\001G\ -V\004'\xA4\xB5\003\012\011@\xC5\003\010\004|\xA4\xC1u\017\xC9\xF4Q\000\022\x94 \001a\001@@\xC2\005\002\xFC\024\xD4D'\xA5\xB4\034K.\xD9V\x91F\034y\004\x92H$a\xA4\xE2\x8A,\xB6\xE8\ -\xE2\x8B0\xC6(\xE3\x8C4\xD6h\xE3\x8D8\xE6\xA8\xE3\x8E+\006\004\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/config_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/config_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/config_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,22 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource config_gif (from file config.gif)""" # written by resourcepackage: (1, 0, 0) source = 'config.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\x9B\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9C\010\x84\003E\x89\034\000\\\x84\x98Q\xE3?\035=~T\030R\xE4?%M\ -\x9E$\x98R%C\x8B \001?\xE9r!\000\x98$i?(\023'J\x9D;!\xCE\xF4\xC9\022\xE8P\x9EG\013\xB6L*\x94\xA6?='\002\x85\011\xF5&E\xA3\034\xAA\022mj\xB4\xEBV\ -\xAE]u~\xE5\030V\xEC?LG\xA2\035{\021*?-\xDF~,)Wm?$\xEB\xE2\xDD?\xAF?\x80\003\013\036L\xB8\xB0\xE1\x8B\001\001\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/help_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/help_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/help_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,23 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource help_gif (from file help.gif)""" # written by resourcepackage: (1, 0, 0) source = 'help.gif' package = 'spambayes.resources' -data = "GIF89a\026\000 \000\xF7\000\000\000{\xF7\000\x84\xF7\010\x84\xF7\020\x84\xF7\020\x8C\xF7\030\x8C\xF7!\x8C\xF7!\x94\xF7)\x94\xFF1\x9C\xFF9\x9C\xFFB\x9C\xFFR\xAD\xFFZ\xAD\xFFc\xB5\xFFk\xB5\ -\xFFs\xB5\xFF{\xBD\xFF\x84\xBD\xFF\x84\xC6\xFF\x8C\xC6\xFF\x9C\xCE\xFF\xA5\xCE\xFF\xA5\xD6\xFF\xAD\xD6\xFF\xB5\xD6\xFF\xBD\xDE\xFF\xC6\xDE\xFF\xD6\xE7\xFF\xD6\xEF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\ -\xFF!\xF9\004\001\000\000\036\000,\000\000\000\000\026\000 \000\000\010\xA7\000=\010\034H\xB0\xA0\xC1\x83\030\036$ \000\000\000\x81\004\0204\034\034(\x81a?\030\017T0\xC8\xC1\000?\037\025\024\ -\034\xF01\xC0F\017\023\002|D0\x90\001H\012\004#\x80\x94 P\000H\x83 \017\010\004\011\000\xE7M\017<\013r\0009`\xA2\xC1\006 \035\030%\xE8\000\xA4\x80\xA5\002+\x82\014\x80\001\xEA\002\x9E\ -\005$.E\x9A\024\xAA\007\015S\xABz?\xA6W\017\0261\x9E\xDD\xF9\xF3l?o?]K\xB7\xAE]\xBB\025\016\0000prm\x85\x8F}\xBDz\xC4h\x80n\\\xAFz3?\000\xB8\ -\xAE\005\xBD|\xEF\x9E\015\010\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/message_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/message_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/message_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,22 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource message_gif (from file message.gif)""" # written by resourcepackage: (1, 0, 0) source = 'message.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\x97\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9CH\xB1\xA2C\000\0303j\xDC?c?\030-\026\014\x89\x90d?@L\ -\032T\xF9\020%K\x82/\033\xBA\004\000\x92\xA6?5'\xE2,iS\xA4\xC0\x98?{\xFA\004\x9AR\xA8H\xA2Do\032\x85)??H\x97V\x8C\xEAs ?N5B\x95\032\xB4jW\ -\x9E^\x8B\xE6?u\xEB?W\xD1r\025\xEB5\xED?IO\xC2]\xAB\xB4f?O\xC3\xEA\xDD?\xAF?\x80\003\013\036\xBC0 \000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/query_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/query_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/query_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,26 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource query_gif (from file query.gif)""" # written by resourcepackage: (1, 0, 0) source = 'query.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\xFE\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9CH\xF1`\x8D\013\010\000\004` \xC2G?7V\014\xF8P\003?\031\030\022\ -\xD8\xF8h0?\0011\x80\xE4\x98!bC\016\025\007t\xB0\034\010\xC2\003\x87\015\005o@\xB01b\xC2N 4\000\xC8`\000C\xE0\017\014\"\x80\xE0`\xC0\x83\xE9\xCE\014\000z\014\xE01B \017\ -\004!\x80|\020q\xE2\xC2N\005\000\x80\xA4\025\xB0C\xE0\x8A\002 at j0\xB8\x81`g\x80\xAC\002|\004P!\xB0G\000\x81?\004\000\x80?\032\01688\x8D`2\xAD\xE0\x8F\004\000\x8C\xD0@\ -\xA2\xC4\003\x818d ]`\xE3\xC0N\010\000\030\xC8H\xE0\xC3,\xC1\017!NT\xD89\x82\xF0\012\011$\012\xE6x?\xC1\x8A\x9D<\014\00080\xE3@\x8B\x81?P\xF0\xE0\xE0\xE0(\020\027w\025\ -\xAC8\xB0\xA1d\017\030\022\026\xE84\x8E\xE2.\x81\016\022\022h\xE4\xE8?@\032\025\006`\020&\xCC\xC3;\xC2\002\x84+\xD00P\002\xE1\014,\xD8\033\xF4@ \xC0^\xF9\005]\x8C?\x9F`\ -\x8D\xF1\xC5\xF5'\x90\017\xE3\xC1%\xA0@\007\x8C\xD7?\021\x8C\xA7?\032\x8C\x87?@\xB4F\x98\007\024\xB20\xDEj\007\xFEG\xD8\002\024\xEAE\xD8\000\024\002aB\001\003tU\xE2\x8A,\xB6\xE8\ -\xE2Q\001\001\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/status_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/status_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/status_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,26 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource status_gif (from file status.gif)""" # written by resourcepackage: (1, 0, 0) source = 'status.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\xFE\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J$xC\xC4\004\004\001\000\004 at 0A?\x89\010c@\000@\xB2\xA4I\000\020b\ -\x80\034\xD8#\003\xC9\001\031T\xD8\xF8\001\xE4\x87\015\025\031\006\x90\xCC\xD0\003\xA4\x8E\005\000\004\x80\xE0\x91\x90\007\010\001\000\026?C\001\000\0055\010\x8E@\000\000\xC1\010\x826\x80*X\xFA\xB0\007\xD0\ -\007=\007\x828\011\x82`\x8F\007I\xC36t\xA9@\xAD@\x9D&\007\024\xEC\xE14\x83\xC3\030A\xA3\026\x84[RnA\033HU2\x8C\000\xA0\xAC\xC1\xB1&\015\027\034\033\x81\xE1\015\000\003\x88\036\x9CZ\ -\xF5\xEAA\036:?*\024\001\xC0\xEEJ .E,\x9C\000@\xC5g *\000LX\x98\000\x80\x8D\x84'\023\xDA\000\x90`aF\x9A\010c#\xFC\xA1q!I\x85\xBAs\003\xF0\015\000\xF7\xC1\xE0\006y\ -\017WH\xF5\xB5?\x8E.\015\xDBd\xC2?7w\xAE\016\035a?#s?\xFF}93?\x8A\013\"'8\026BC\030A\x9D\xAB\xB7n\0200\000\030\0161\xA45\xB8\036\x88\ -W\000\030t\xF5\x95[@\xACw\xD6~\017\xE9`\xC0S\xF2\025H\x9F at Y\001`@\016L\001%\x94d\xBA\031\x85\x94R \xF5\xA0\037d1\xCDT\xD3M9\x91\x84\001\x81\022\x89t?)\x9DF\ -\x91E\030i?G.\xD6h\xE3\x8D8\xE6\xA8\xE3\x8E<\xF6\x98P@\000\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/train_gif.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/train_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/train_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,29 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource train_gif (from file train.gif)""" # written by resourcepackage: (1, 0, 0) source = 'train.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\xFE\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9CH\xD1a\015\012\001\0028\x80\000\xC0@\x89\x8A\010\x80(\000?\x84\0174\x80\ -\xCC\020\000\xD2\xE0\x8F\012\020r\xF8X0\x82?\003\000\0000\x88\xD1RFN\000\025~\010\xBC1`\000\002\030@~\xB0X?\xC3\010\x83\022\002t\xE8A\020 at C\023\014\\\034d\x90\xB2`\012\ -\011?n`\010\xF0\xF3\xC4\xC2\021\012:x88\xC0\x87\xCB\010\012(\xA8p\013\xC4?\x85\010f?p\xD0\xEA\xC1\013\031~?\000@#K\x85~\015\010-8\x80\xC7\xC1\037\020\020LX!\ -\xF4\xC5\001\xAD\011\025\xD8\000Ram\xC1\0062\020\x86x \xF3E\010\033/\030(\024\xC1\001H\017\006$\012~\010\0212\x84\001\001\033\xE8\xFAE\xC8\xC3\xC0\016 :\024\xAC X#'\x81\010:\026\ -\xBAh\xB0\xD0Cl 7\016\xBCpy\x82\001?:`x?\xD0\006_\x815\014\xFE\xDC8?uU\000\004\034\x84p\xCC\020\001A\026\015\026\023\xFC?\005A\xF7\014y\x84p@ g\ -\xC1\xF2\007\xDD`@\015\003A\xB0\x99B3 \xE0\001\014\xC9\031\xE4\003\003'\xC87\x90e\xE3\001A\x82g\0115\x80YB:D\xD0\037\000\004\016\xB4\x82\002\xC9\xED`\000{\010\xF9\xE5\xC3\006\002\030\020\ -\x82\x84\004\x85\xF0AA$0@\025\007\"(\xC4\xC0\0136\x84\xF0\x82\0179<@\xDBA20W\x90\007\025\000a\x83\002\012\xB9 ]R+L\x80\000\0040\012\xC4\xC3]\005\xFD`\x80@\xBB!$\ -\x80\003dM`\xC3\017\031\\\x90\xE2A\020?\xE0B\003`\xE6\x83\012\024(\020A\x95>`yd\007\012<\xA5\xD0\011?\005\x80\xC1\015?H\x90\x82A4\xA8f\x90\013\014\x98\xD0P\x97=t\020\ -\x80\004\006\x8D\xD0AK\013\xB0 \024\014\010\024U\xE1K?\x85\006R\014\014\xE4t at M#,\000$\004A\xB5T\x90\0003\000A\xC3\007 \022x0\022\010U\xB6T\x82\001\000@\000f\000\024\x84\ -\xA8\xEA\xAF\xC0\006+\xEC\xB0\xC4\026k\xACB\001\001\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/ui_html.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/ui_html.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/ui_html.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,155 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource ui_html (from file ui.html)""" # written by resourcepackage: (1, 0, 0) source = 'ui.html' package = 'spambayes.core_resources' -import zlib -data = zlib.decompress("x\xDA\xDD=ks\xDBF\x92\xDF\xF5+&?!\xD5R$%\xD9N\xA2\007om\xD9Y\xF9?}\xB6\xB2\xAET*\xA5\032\002C\022+\020@\xF0\020\xC5\xCD\xED\xBF~\xCC\014\006\017\x8A\xB4\x9D\ -?:gW\"\001LOwO\xBF\xA7\007:\xFF\xE6\xE5\xBB\xCB\xEB\x9F?\022W\xD7o?\xF7?\xBDx\xF3\xFARx\x87\xA3?\x93\xCB\xD1\xE8\xE5\xF5K\xBE\xF1d8>\022?L\x8A\xA8\ -\x8C\xD2D??\037\xBD\xC9\xDE\xF9\xA2\\\xC6\xF8K\xC9\020~\x95Q\031+\021\x85\027\036}\xF2&\0373\xB9|!?\020\x97i\xAE\xC4G\x95?\\\xFCT\xC0\x8F\xD7I\xA9\xF2\x99\014\xD4\xF9\ -\x88\036\x86\xE1KUJ\xB1(\xCB\xECP\xFDVEw\027?\014\026\xCA\023A\012\xCF&?\xA4\x87\001_\032\xF5=\xFE\xEA>\x8BrU8\003\xAE\027\xD5@\000\xEA\xFF)\023q\xF4\xFD\xB7c1\ -\036\x9F\xD2\xFF\xC4_\xDF^o\x80B\x93\036^\002\x88<\x8D{&\037\x88eU\x94\x87\xB9\xBA\x93q\024\xCA\022.\xC0\xAD\xA2\004\002\031bQ\xAE\x91\x9Ci\032\xAE\xC5\xEFb\006\xE3O\xC5\xF7\xE3GB\xE6\ -\x91\x8C\007\xA2XEE1\020\013\025?2\012\xE4\x99X\xCA|\036%\xA7b,\xFE\xB9W\xCA)\xB0p\x87a\xF0\xEC,?\xF0\xA8;|O\x9E\xC6Qr\013W\x834N\xF3S\xF1\xA71\xFC\013\ -\xF0\x96<\xBD\x8B`\xF9T\xD8s\x91\xE2\xD2?\x9E\x8D\x9F\x8Cg3\xB85\xD4\034\020R\xA3u\xB8R\xD1|\001\xD8M\xD38\xC4\007\xEE\"\xB5\xA2Y;O$\x80\xA1\x8C\021\xAF\xE1T&\011M0\ -\x95\xC1\xED?F\037\xC0\x8E\xE1\xC2#\xDFt9\xF6&\xF0\xEF|\x84w@\031 at a\xF2\xD2!j\xB7ah\x93\ -?H3\x95\xEC{\xDAFy\003\xE1\xE5\xA5w\000\xFEV\x86\xFB\007\xBB\001\012\xD3\000\xE0\xD4\xD3\017\xD1t\x82\005U\xF9>\xC2\xDC\021J\x96\x83|!\xACa\xBD\xAAz\xBD'\x8F\xE3\xF2\xAC\xD5\xED\xCA\ ->\xB4\xFE#t\002\xE7\xA3h\xB23=\016\016C\002\006\004z\x97\013\x99\xCCU\xE8\xFD\x9F\xD1c\020h\xD13\002\xF1j:2\xAD\x99\037S\022emkP\x85\xC8nU\021\x84\021V\xC6[\x8E\006=\ -gA\xD6\"\xF1\xD9\025\xA0\xC1\xC3q3\0111\x8C\x9C\xA6\x80u&\x8B\022m)FG\xC9\034\xAD!\x84\xBA\xA0\xE6\003\x91\xE6\014\037\xEF\022\xF8?\023\xB0Y\x9E.E\021\xE4\xB2\004\xEB\0321R`\xE7\ -\x9F'a\xD7\035\xA2\xCD\0108\xB5\x8A\001\005\xD0,\005.h\xBA\xD6\026\036\xEE\002`\x9E\x85\xFC?\010\x90A85\xC2\"\x85+\026J\x95\x83\xDA\xD8\xC1=\xA05eO\x8B(\x83?H\xE6\025\022\015\ -&\x9AT\017\xACs\xA2V\xB5\xE9o1\xE8\x90\034\006\xFB\xE3B\031\\\x90\013\xE8X\xC1\x80\xAE\x85\x92?i#_\xA8\030\x8C\">\xC0?\xE3\xDFk6\xC1\023) \x81\026\022\037\x8C\xF2>\x97R\ -h\xF0\020\x8A\xE4\x98Ff&Jq\xE3KoB\xE1X\xF8\002\015\xA8E?\xFD\xF4MO\013\017g\034:\x92s\xB3\020_\004*\x8Ea`\x80i\x97o\015S\x99O\xCE!\xDA5\xC0\xE0\xA6\xD7\032\ -\xAE/\xFB\xA8(8\xF1\x85\014q\033M,?\x97!(\014\xC0i\003\xF4#X\xF9K\x98\xD5G\xE1\xA70\024\0229\xBF\005\036\xA3]\x9F\xD3 \x80jF\xE7[\xE4\033\011\x87\x84%#\xAB\xC52ncx\xBC\x8E\x97\xBFV\xBA\xB7\013\xB4\x9Dn\xA1?\xA3\xF4+\xB8\xBAA\xC8?\ -C\xACE\x9E\xAEx\xB2\x93\035D\0341i\010\xF8\xF1q-\xE0'?\0128\x82a\xEF\xF3\xA0xL\xF3|\x8D2\xC0A\036\012\x9FL?\xC8T\020?\x80\x97G\xDE\xC9(&\xFE\xCFR\035\ -{kh\xC3\036,\x9A\xBCj \xA6\xA5\xC0A\005r\xD7E.F\x93\x9D\x86#]\xE4\xC1\xA6\xD5FH\001\030b\x880\003P\x94\x81\xBD \x8B?|\012\xFFAR\032S\002\023\x81\xE1@>\002\xDE\xF0Q&\001?\037\xD3R\ -\xD5\xD9\xD8R-\xA7X(!#\001?cj|\xD0O\xA51$\034\012\x9F\xA1A\xA0\xA6+\xB0A\xBFU\xAA at 6\024\xDAnD9xl\005\x80!\007\030\x80\0076\031\016\x87\xEE4\004\010\002\xDC\ -\xEB\xA1b\x89\x92\0069?B\xB2\xA3\022?\xAB\005:h\xB4+Y\xA6$f\xAC\xAFg\026\020\x92\x8E8A^\0024\004*\xC7\xE0\x91\xD1\xC2[mf\x93\xB0%x\xCBo\xD8\xC7t\012\022\006\xF1\ -\001f\x949P>\003\xF34]\xC2\xFC\034\020\000\027\xEE\"I\xDC9\x97\\G\xF0\xB0\x94{:\032\025\x80\xA0\x80\xA5s5LT9\xC2\xDC\xF8V\xE5\xA3\xFF\xC0@=\xBB\001\xA9yv\xF4\xED\xF8\xD8\ -s\xA5\036G\xFC\x80#\004=M\xD1?(\xD5\022+\022\003\\\xE9\002R=\xE4[a\xE2\003\x88\x91P\014\xC0\xEA\xD7L\xA4\xA0\007\026g\000&,\x87,\003\022\x90\034\x88\000\xFA\xA7U\xB1\026<\036\ -\xD6z\x85$\xD3?\xA0\000\x88\xBB(\xAF?X at 3\010\x9DB\023\xFA\000\021\034 at L\xD39<\xA6\x8B\x91\0204LQU\xAC\xB1\025#\xD7M\xE9,\xCD\xF0?J\xB0d?\037\x96\017\x93a\ -\x95b\x86g\xE2\xC1\xDB\004\xE4\030\x9D\021&?B\xC7T\xF8\xAF\xA8\xE6s\xC4\xD1\xC89\013\xC4,\xBA'?\013\025\xAB%f\xF7\xD7)\x9B\007\xCC\xC3aT\xAE\xEC\xA2[X\xB4\xF86Cwp\0328\ -\xB5\020\xD4\033\xBB\xA6\xB5jO\002\xC8bJG\017\xF5l\xCC\015\\'R#\x98nh5=X\xA4iA\x92\xAAP\xDF\xEC\xFA\020;\xC1pX`Ua\xC4\012\x96.\x86\x88O\011\x954hpq\007\ -\xFF\014l\x8D0\xC0s\x89\xA8\xAD\xDF\xFE;\xB4\xA0\xAB\xA8P\xACM\xE0\xBF!\036,hE\xE2\xE8\026\003_.9xz\xB2\022|\026 !\x86\xC3!\xA4k\x9B\xAC\xA8u\xB2\xB6\xC4\xF5\xA0?\xA5\x88\xE6\ -\xBE<\x84\xD8\0017o\xEE\034\xEF*\xF0\x86v\xB1\x8B\xA7-\x97w\xC3\xE5Yo\xF2\x81~\x8B\xF78\x80}\xDF\xE2\xE9\xA4\xE9\x93\021\x8E}~\x8F\xA2\xE3OZ\x9FAFr`5\xD84Hg\x89\xC1p\ -?\xAB\xC8K\xE2\016-\xCD*\x82\xAFS\xED\xD2\xC1\xD7`\xF1\xAA\020~E\xAB\xE0c\xADEB\\\xD50\xA4:\xAD\xD1+C?\xC0q\006\012HE?\x9AB\031\xCE\012\027q\016*E\031\ -\x8D\014yJLOx=\x90\xE3\030\000\xA5X=\xE1\002\002\xA3\015\xD6 J\x8C\036\032\xD4t\010E\030C\xB6\x9E\xA7wJ\027\x84\xD6\xF8\034\xC0\xA2b\033\x9A\xB4\xBB\006A\xE0t\022q<\xB6\032\x8C\006\ -]aa\012\037e\xF2\013\xA5p:2\x9E\000\010D\xBEH\023\xF2\xB5 CU\\\xEATA\010\xE6u\xAD5\x85\xA4\xFA\021d\004\x90a%\xF3\011\xD8.P\033\011\xF9K\x90fk,2\xD3e\x9C\022\ -\031\037%\x90\xA3\xE0L\xC8\011\x80U\xA4,\xE9-\032Q\027\xA7\030Z\x86*SI(\023\012r\x91\x9DT\\\"6\006\xE0M\x93\xD2\xD8\xFD=\xADLC\xF13\\0\xD6%\xAF\xD0?\xFD\x9D/8\ -\x80\xADy\x80\x8C#\xF1\xAFi\xA1\x92\023Z H\000\xC3X\xE9?ub\034u5kV\x95 \032C\016\xC9I\xA8Q\xB5k\xFB\xC8\017\xA3p?\xCCY*\x8C\xDD\005\xC9|\xB4O\xBBz7\ -\0127\017\xD77\xA1\\\027\007\x90,\xC3/F\xCA\014\xA7\000x\015Fx\xAA\024\xDAz\022\012\025\016\005x\014^?=%!`?!?A\021Z\005\\8\xBD\030aT\0042\017\xEB\xC5\xD9\ -\017S\024h\x9A@`\xED\017I\xD3\xC0\017\006\xEEH5S\xB93\016\xAC?\xAA\xA5\xB55T`52&g\x93\037`@c\x88\020\xFB \xED\x8C\026\xAB?\x9Da!\x97\026\xFE\xC0\xA8?\x83\ -\002\x84\xB0\xF5\023\007\xBC?\xAEU\x82\"\024\xA0\031`\xE6 at 8?j\xC6\007Q\036\xE0F1\xF1\021\xBEC\004\x91\xA7Y\036a\xA1\016\x82\xF0j\x99\x9C\x89\x88\x8D7\x98\xCF\0053\020\xEB$\xD6\xF4\ -\xD6\xCB\xCB\xF5\x90BRAS\006\xECGL\xE4\xE5\xCE\xCF3\023t\xA1C\xFE\xA6\032\xFD\xACc\x96:\xD12\011;F\035\\\xD4\005\x89\x80{!\005#\x8DU\037\x80s\007\x8F\037\xCD\xF6t\035\x83\xE3f\ -\x95\x90\xB4\xBB\x8EW\xFB'\xC4|\xC9\001U\010quA\xF9X\xE2\022\x87KmC\xC8\030t\x93\xEC\xB0\xF3\000\xD9o\xB1\xAF\xA7\xE3\xE2\xAE\\\xD1U\012\xEC\xF4`\037KV\xC8\0340\x8E\xA1\\\xE2\xC0h\ -?\023pq\017-\007\007!\030\x89\xC2\xD3\\MYRV\x83Z\037\xCAR\x92c\002/\xAFWy\xD0?\xC0\xF0+m\xCC\xD3d\xF7;\xB0?O\005\005)t8?X4\x96\037\\\ --\xEDv\xA3if\021@\xD3\037\025\031\x96\xFEC+\016\003g\xA9\xCF\xD5rr\x8D\xF2}>\x82O\xB8<%\x8E\xE6`\032\xD6\xD0 \x87Fc\xE8:%\xB6\xE9\024\x90V\031n\xF0\x8B\xA8,\x88\xF6\xA9\ -d\035\x86\xA0$F\xF2\x88\xF3x\xA3IY;n76\016+?|\x97\xB8y\x82\025\xAB>\x82??U\034B8\"\xF5\026\x8DY3\x92?\xCAs4\xBBV\xE7\021\031\xB1\037?\ -\014\xEE\xE1\xE6\013<\023\x94\003'n\xAB\xAD\0212\xE9\xA51@\xC8&W\xFE@\x9AH\000\000'k\xF1p\005\x80\x82C\xF4Q\xBD\x817\xA0\003\x8A\x9C\014\xC1\xB3\x8C\x8A\xE9*\xBA\x8D\xDC\xE4\031\xBF#\x93\ -L\xA0\x86?*\012]\x8C\xA8\035\xAD\012\026I\x84\xE9\007\xD8\0242*V\011\xF4\xBC\010\004\0278\xBD\x85\xB8?\xDE\xE4x-\xD6\xFBxu\005A\xAD?\\\025\xCB\xE2\x8A\003{\xAA\025r{\013\ -\xB0\006\xE12\xC8\032\xFB\xB9JT\x8E\xC1\xFA\x81\xF6\015,e\x97qE\xA1\x88\x83F=\xC6l\xBD\xE8u^\x9B8\xC2 \xB9\x8F~\x85d\x9A\xA74?1JK\xC7A\xCB\xEF\xA75\xCD\xE4\xFA\xD8\xE6\ -`#\xC7\012\xF7|a*PL,=\016j)\\?\xB2'\xE4>\x87l{\xC2\021M\x8E^\xD0\xFF\xE1\xEF\xB5q\x99\xCE*`\000f(\x8F\020R\xE0\xDFK\xB9&\xEA\001\026\xC0\xC5[?\xA2\ -m2\x97\xB5\xF6\025F\xFD\xCA4s?l!\xA0\x8D\x89\xDE\012\xDC+\xB9_\xD4I\x88\xE0\xC9\xED3\026\x85\xC99\xD1\xD0qT\xAA?\035\017\x9D&\xAD\034ZA\x91\035g\005\x9C\xAE\xBD%\0044\ -\xB2*S\xBB\017\x84\xAB?\x9A?\005\xBD\xF9\031\xA5\xB9a\xA8?3G\xDB\xE0|P\x90[\027\x8B>\x93?yH\002\x93\xB9a|'\004\xC7\xCAf\001\xEA\003\xBF\000\x8B((\xB6G\xE1\ -zH;0\xBCU*+8\xADE$tB\xB8'\032\x9E\x89\xC3\xE4\xA6{\xA5BB\xEE\006\xB0 \012?\xB0\013\xD3\xF5M\xC8\013\007\xC6\xEB\xD1zh\xE6\025\030>\033\xC47\xC1&\xE3\x8F!\x953\003\ -\xF9\xAA\xD0DX\xE8\xC9f2o\x8A\xFE%\033\xBEx]?\x9D\xB5\x97$\030\x96TX at A?\011\000\xC6B\003\x8Ax\020\033\xCEA\006\030\x96\xEEa\xE1\006?.?\025\xE6\xD93\ -0O(\033sY\x92\xAC\002\x8F\xB2\x94S\xAE\x823\003\x8Chi\xA0\x99\037\000\xD1\xD0\xE6\xBC<\023De0d\xA5\xF5;?\035\xEF$ \xB28x\xC8\xFD\x90G\xE0\022\x9DY\037X1\xDCU7\ -\xB6\xF0\xF1oUZ\x9E\031{\x84\xDC\xE3+\xE8a\xAD\xD3\xEB\0305M\023,N\x9A\xC02h\x97\xE8\004\xDE\020\xFF\007\xC6TS\xA4\xCD\xCD\007\xC6e\022X@^pF\037\016\xB7)\0036\x88\xDC@\x9C\ -x\xBF\xF6\xA8Md\xBB.\xB8#\xF6\xEA\xCDw\xD3h\x80?\xF8\xC1\xDCQM\xB7\xAB\xA6\xCE\xE68[\xBF\x9E\xE0\x90\xFCFG?0?7(P\\\xDC\xC4\027\x98\x87\xE6t\x96?\x8F\x84\ -\xAD0\005\xC7\026d\xD8\034\021\xC1`,\xC6\xFA\027\xA9\0348\xB5Y4\xAFr.64\026^\xD7;H\x9E\xEBe\xC0\xC6D\xF2%R,q\x9F\036\xBD\xEE\xF4^?J\xCC}?{\xA4\011\\\ -\032n\xB8\021\xE6\xBA\xD6ab/Z?>\xAB#%\001\xAD\xD0\xDC\xC6\005\xD2\xCC\xEAB\xC1=O\02191\xB9I\017LzB\xC6P\x88KcGa0\xCB\xDF\013,\x91+\xFEll\xE9>j\ -\025\010\023;\001\x8A\0216\x88Z\\Q\xA9L\xB7\x93Q\x9E\xA4}t\xD2\027\024\xA2\xA2]a?Z\xBB,{\xE3c\xA6\xEF\000\020\x9E\xB8\xC9\xE87\x90\x85b]g`X\xC1?:.o\ -\xB3\xD08\xFF\x81.\x849|\000\xD2_q\xEEU\xD3U\xEB\xA2vGD(,\036\xB1\x9F\xA8\xE9\xE7\022R\034\xA7\x81t\xF93\x8B\xE2n4?!?\x8A\xC2a\027\x80\xE3\031?X\xC0\x92\xCA\xC4\ -pu\002\xCB\xC0?\"1z\"?\x8A \x8F\xA6\033J$d&\xB15\xA7/\013\xD02\xBB\xC2\xF4\0027\xA4#\014?\xB2?K\x8A\xE0\x8C?]K\xC7L\xE1 at Vq\020\x86\xBCl\ -\xE9?\025\xC60\xE7>\001h\000\xF4?\xCA?\x97\xA0\xF8\021DDk\\ 4\004ff?\xB3\xC2\005L\005\xD9\xE0\x8C\xD2j\xD2m\xCB\xCEk\xACk`x\xA9}\021w\xD1p\xBC]W\ -)\025\027x(\001\012\xEFp\007\000\021\"~\xFC\x86X\015\x9A\xB9\xA0\x9E\x8FK\x96\xB02!\x86\xF0\xE4tr5?\xB3P\xAC?Ju\xF3\xDC6\034\xDA{\xA8wxj\001\xE4\005\xC5\012\011\xAD\ -\xA3\xA9'Q^\x91E\\\xBD\xDA\xE4N\xD1\xF4F6v\xE4\xD4\xC3\xF0\xCBX\001J\x98\x912\xF0\002qT\xB4K\xADX\xA1\"\xB7\x87\x9E^\xC7\003\xB5\x9E!\x9Fm\x85\x85\x9F?\xD7d\022N?\ -)u\xD2?\xB1\026\xA4V\006(n\027\xE9\xF2\x88v\014\x8E[x\xFDR\xECs\xE5<\xB2\xFE\xD3t\xB0v8\xE1\x96)\x99\027\x94?\xED\004W\xBC\023b\xF4\xAB\xBD?\xB2\x9E\x84\x92\004\xD4\011\ -{\033\033DX\xF0\xACg\xA7Z\x96\xE2?z\xFD\xF6?\xCA\xD3\xE6\x92\xD7A-eIJ\x99\003\xC8=\xC9 \x80Y\xB6]\xF4Ce\xE7\xE7H\xC6!?X\x85\x87@\007ma\xFAu\xA1\ -\xBE\xB1\xAF\xEB\xD4\xF7M#\016\xE4\xFA\\\007\xB8\xF0x\xCB\xC7\xEC\xED-U\xB9Ha\xCC__];\x9B7\xE7\xDF\034\036\x8A\xB7\\\xDD\xE7\xF6\025\xE4\xCA\012s at L\x9F\xD3\xD9\014;Y\xA6X\005\xC6\xE2\ -\xDA\xC0.\xED\022\0348\xF6\xB6?\000X\x8B/O[[\xB2\xD4??\027\036 \022\xAF\017\xCB\xD44\xF6\x9C\x8Cm3O)\017\x97j\xAD\xF2\xBFD\x8Bj\016\031\xF00\xF9\x87\xA7\x9B\xC4<\xDD\ -\xD8}\xFC\xECi\x86\x9Dmr\x8A\xE5\xD4\xFB\013\xEF\x99\xE7n\xD9tf\x9B\006A\xCFD_\002\xB5PT\xB3`\xB0Y\036\xA59\0307o\xD2i\xFB>O3\xB2\xBAz*n\xE1\xF7 \xAA\xC4\xDF\xE7#\ -\xBE\xBBuX\x95?\xB3\xF6'\xFA\xDD?\014\x921?\xBEzx\xE8n\xEE~\xE6\xEE\xFE\xE7\xED\xF0O>b\015\010\xC3G\xA3\x90\xADM\xFD\xCD\xE0xC\xF9\007?S\036\xB3?Uu[\ -\xC0x)PKo \xB9\xCC\xDDuF\xADpn|\x85|\x8D\033\x92\xF0\x994~dC\xF9\xF9d2i\xDA\xCE\032?i\xC2\xECeM\xD6{\xDE>\xD4\021\xF5\xF4\x86\xDA`\xF3S\xF1\x8B\xDEW\004\ -{\xBD\\\xE2&\006\xEEg\xFE?\xF8\xC9\xD3q\x93?\xA1X\xCB\xC2\xE7P\x8C\x8B\011V\034\xE2\x93\\f\xA0Z\x8Bu\x81%\005\xB3\xBE\xDA\xE41\xE9\xFA\xCB\015\xB59\x9082[0\x88\xE3\036\ -\xC1-\xC4=\xF1\x90\030=\xE3\027S\xF9\xBC,\xB1v\xFD&\x9DSx\xF8\xA5b\x8Cc\015\x99\x92@\xB6\x97\x9A\x9F\xA8\xD1\xFF\xD61a[\027\xC9\010\013Z\xFFt\xE5mB\xB0?\xA3\xD9G[\x9ET\ -\xB7>\015?\xE6\xDE\003d\xF0\024\02634\014\xDE\026\xE4\xDCF'\xEC\016?\xBB:FN\006\x9D\xE6=6sD*?\xC6\xEF\x9E>\xAFC\xFA\xEBZ;\xF3\xDD\034\x98\x82\xEF\x8D\036\xA4\xBE\x93\ -\023\014\xD7?@\x9C?\xEE\xF8\xA2\x80\xB1\xE5\xFD\xA6\x93\032VR-1\xAC\001hc\xDD\xD0u>\x9AN\004\xEE\003\015\036\034u\xD5\035\xB4\xD86\xE6'\xAA\x84\xB4FqydX7\x96Q\xAB\ -CZ\xCA\xD8\011\xBF8Tl?x\x9F\xB6\xE6@\xBC\x9B\xF0\033C\xAE\xBA#\026\xED\001MDl9\\\027\xE2?\xB9\x9B\xAC\014\x87\xC3\xE6\xF1\x96?\025\xBB\xCF\017\x82\xAE{?\035x\xA6\xEE\ -}\xDD\xE4\xE1\xFEl\016q\xDB?)\xEC9 .\035<\xD4(i\x8E\007\xE1I2\xD4'K\x8D\xF2\xC3\033<\xBFS?\xD5?\xFB\xD3D\xE3\006\x8E?\xA1r\x93\x9B\xBB@\xE4\026\035\xDB\ -\xBC\xA1\x9A\022\xA5\x97C\xD3\xEEc;D\x8D\xBF\xEE1\x94\x93a{A6\xB4\x9E\031\xF3Rw\xF4\xAB\xA5\xD7jg3\xC6\xE8\xC4\007\xD1 \x9E\xADd\x8E\xB9H\xCB\004}?\xA6\xD5$J\xC0\xEFA\ -|?m:\x82>\xEF\033\xEE\007?\x9AM\xA4\xD4\005\003\x89\x83{\xA4\x87A\xE1\036\xB4.?\xBD?\xE8\\9\xA1\xAE\xCE\006\xA4\004;N\013\xF0\xB5.G\xA6\xFD\xEC06p\x8B\xC1\xE3\x94\ -\xE5?\x9Ap\xFB41\xA6\xBE\xA5ys\xDDH\xB6\012}\xE2\010+XEw\xEB7?CU0\xA6F\xAE\xB8\030\xE5V!\024\xEEZ\xE3v\012\025\x9CR\xA7\xEB`\xCFm\xFA\xA9w\xB2|F\xCB\ -7\x9D/\xE6q?2\xA5{]\xBC?xdT_\xBF6\xDF&>\0323\x8EEJ\xAC)c^\xD8L'\033\x95\x8B\xB4\xA6\x94\x8FXYj\xB1\x94\xB3P\xBA\xDE\xE5\xEE\xAC\xEB\022??\ -00\xA7\xABL\x9D?:\030v\xDB\xC4\xE9\012\xA0\xF9/\xB1\xCF\xC0\027\xD4^P\xB8k@#Q@\007\xBA\x93?\xE80\015\xF5\031?R\xDD\xDDLc\xF4\x96\xA3\030\011\x82\015\xBF\xC1\xD2\xC2O\ -\\{\x9BO??\022R7\xE7\xD3`\xB3\x97d\032\012M\x9B\xB2n\xA2\x9E\xA7=\xB3\xF2V\xB6\xC6?/\xF0\x8C\x8De\xF2>?\xB6G\xB2\xB5\xF3\xC6\033c:M?\x87q\xEBN\xE7\xDF\ -\010IWb\xB0\xA5\xA8\xE0V$nZ(l9c\x8F{>\xF9??8p\x8F\025\xB8\x89\xAF\x91C\x93\xF2\xFA\x90\xF2\xD6v?`\xFCE\024\x86\012\x96\x8CB1\x9F\x92;ja6\0379\ -\xB2\xF1?M`|\002\012\xC9\xC3\xF9S\xDFh\x8EZt\x90\002\xB7\032A\x89\xF9?\xA2\x998\xA51?G`f\xFEy\xEA \xFF\x82V\xDB\xEF9\x9D\x8C\xFF4jv\0372\x94\020\017\x86Q\ -\x81\xD8\001\x84#\xE7x\xAB\033\033\xB1\xAD\xDE\005\x87\x9C7\xF4\xB6?\xB7\xFD\xBEz6\xE4\xF7N\004\xD3\xEE\xEA\xE7\021\xBB\xC9\xB6Z\xC5;}\xFC&\xBC\xAD\xFD\xB1\xB1bA\036e\x86\036t(\xA3\xBF\ -\xCB;\xC9W\xFD\xC9ht\xFE\xCD/\x97/\x9F_?\xFF\x85O\011U\011\xABi\x9A\xB0q\xDC?\xF4^\x832X\\\xA7|\xA4\xECw\x8BH4\xC3F\xA8\xA0\xC2\xF2?K\xBA\x8F\037\x8B\xE6\x95a\ -\xAC\x929?\013q|`G\xFE\xBE\xD7<\xC3\016\032u\xD1\032\xF8\xCB?g\xED\xA7\xC4~\004?\xCFD$\xCEi\x94\x86\016\027\xFE\xFC\xE7\x83\xC6?w\026\x876\xCF\xF1\0344\x80\xC0\xB1\ -\xBFD\xBF\016qi\x87tc\xDF?\xF5\017\xBA\007\xEC\x91D;\xD0\xD0rq!N\x90R{\003p?\xB4\x8F\xF2\xF8q\xAFX\x98\031\xF5\xB1\xB6\013\xCB\xD4a\x99\xBEIW*\xBF\004\007\xB8p\xD0\ -\031\xFC\xFB\x83\xE0\xC8\xFA\x825\x87\xC9\xF3Ju\xF1\xFF\xE7^\xFF7\xFE\xC4?G\xA3_\xB5\xE7?H4v2u\xEF\xDF}\xBC\xF6'\xAD\004\xC97\xD5\037\xCE\001\xDD\xF71\xEChl?\xE7\xFB\ -XM\x8D\xA3\xEE=\\\000\001?/W\x92\x85\xC0\x97\xA6\x9Cn\014\x8D\032p\x8C\xB7\xF7\xB9\006&upPt\xEA\0106\xBBm\xBC\031\x81-\003\xB9j\x9F\xC5\xEF\xA4\035\xBA\013\xD7\031\x83Az\xCF\ -\010?\x9C\xE7P\xD6l?\x93\0111\x81\xB2]\xC0k\x9A\x8E:\x97i\x879?{\xB3p\xB9\xBD\x95\xF0I\x8B\xAA\xFF@/{a\x80y\xB8:\037\xF4\027\xBD\024r\xB2\005\xA5\x8D\021G?\x8EON\x8F\x8E\xBA\xA7\xEFt]\x85k\x91~\xFB\xB4^'\036\xCFe\030\xA5&84\xCD\003\xA7\xE4s\xFE\xEB\xD5\ -?\xB1!\xE2\xA6[\xC9M%\xD3\xD7\xDFm\\\xD8\xFD\xF9?\x80\xE6?\003U\xFA\xFE\xEFD\000\xEBsn\xA4\014\xDF\xFF\x9D\xD3SA?\036\xBF\xFB\xA3?\x83\x99l\035\xBD\xB6\x98\x8C\x87\xE3\ -\xF1\xA3\xEE\010\xED\xAB<\xFE\xEDM\xB4\xAE\030$\x8D\xBE\xD8\xEF?J\xE6\xFF?\xE1\xE1\xAE\xD3\xEE\020\xD3X+7\x96\xC2h\xE36\x96\xC9\xED\007]\x9Bw\x93\x8F-_;\x80\xA8p\xB0\003\xA0\xED\ -J\xD5, v\x96\xB5\x99w\xE9J\x87^+\xFE?X=e\xAFvnd\xCF7o)\011UY\x9C?\x9D\xF3#\023\xF8\x8Eg\x83bb\x8A+i\x8D\xE8X(H\xA8\x88\xA6e\025\x97\021\x9E\ -5$l\016\xB1\033F[|\xDDY?\xEB\xC6\011\xC7\xE3\xE47\xD8\024\xE6M\006ns\x98&\x85\xF7\x86\xF6:<\xC4?\x83\xFCY3\020xW\xB3\xFF\x9D\xE9h\xC2*\xCCj\x91\xC6N\xCFs\xB7\ -_\x8B\xCAH\xA7\xCEiq\xBB\xAB\xC6\xF3\x90\033\xE3m2\xFF\x84\xB7|.||\033\x8B\xB3\033?\xDF\xC4\xC1\013~\xC3z\xD9'\003\xD4\xCE?\001\xD3\003\xE6o\004\xB7\xF8LhW\017\001\xAB\025\ -w;D?e\xA1i\0114\xC5\xC3},\xA1\xEA\xF5&\xC1\x9A\xE3\xCBp\xA8\x9D\034s\xDCi\x8A'ZL\x9B=\xF7)\xD5}\xE9\x87u\xFD\016k{@\xF88EA\xA8\xEB,\xAF\x8D56`z\x93\xF1\xF0\xDB\xEF\xBE?\xFB\xD6`\x923LH]>9M\ -nt\xEF\xDA\xEDx\xD0%\000\xBAq\xD5.\020\xD7\001\xBD\007\001\xBD71g9?\xA5\xCE+\023\xBA\xA5\001\xEB\033\036u\x8A*\006?\xF41\x9F\xAF\x83q\xF5\xB5 \x9C\005\xEB\001?\x94P_Y\ -\xB9\xBASW\xE2\xF4\x86^\xD20\xA5\xE6\xAA-%\024\032c\xA5\xD5gi\xDDa\xC8?xr\xF2l\xE7IP\xB8\xFC\011\xCB\xD6V\xE5?\xB6b\x92\xD9\017\xC6\024vU\xB8\xF5H\xDDvC\xBD\ -'Y\xBD\032\xA7z{\xCCs\xAE\xA1.\020S\xA6\xBAe?\xA4D\xF3\033?w\xF01\xC2S\xE4}\xD0\xECs7I\xB5dxOY\xA9\x8C\x82e\x93\016?*\xEA\x97:?\x850\xCDg\ -\xA5\xC2\xE3\xBC\xF8\x80\x98\xA7\xFA%\x80\003\xF3\x9A\024|\011\007\x9D\xA5\xA2\xF7$\xE9\027\025\036\x9C\xB6[\xEC\xED\034\xAEZ\xB6\xFBp?\xBE\xFD\x9B\x87]*\xBE\xF3\026\xEC\012\xEB\xEBt\xD2\xDD&\xD8 \ -%\017Bk(\xCD\037\005\xF4\x9A^\xCC\005?\xB7\x9E\xEC\016\xB51\x96_\x88\xD27\xB8\xD9A\xDCa-\025?{g3\x8Fx\017\xA0\xFFJ\xBF\xAA\x99\017\x96m?-\xCD\xDDzsG\xE3\xDB\xC3\ -\xA9\xFF\xB5=\xEEh\xCB\030.\xBE\xB5\006\035ocQ\xAF\005\xD0\xCA\xFAA\x95U^\xBF!\xAC\xF5\xF6x>%\xC9z.dB\xBD_\xA7\xBD\x8A\xC5\xCF<\xE7G<\xAE\x9E\x99\022\x9B\xAE\x9F\031\xAD:\xE8\ -{\xD5\xFCV\x83D\xED\xA6?\000\xA0^[d\xEFz\xED\x8A\030gL7\x99\x9B>y\xDCO\x96f\030\xBE\x99sPX\013\xF6\xEA\xFA\x9F\023o\xBA\xAF\030\x9F\xD4\xEFG\x92x?0\xAF\xA0\xD1\xEF\xD5\ -\xA1\0269\xDA}4/[\xC7\xD7@\xF1\x8Bz\xE9\xDCz\x9D\xD1\xD0\xEB\015\x8B\x82\xDB\xDAr\xE7Et\xBAh\xFC3^ua\xD1\xCB%\xEC)d7\xC6\xD0\035\021\xC5{Y.\022j?\030\xE9\027'\x8F\ -2}\xA9\021v<\xC8\xC2K\xFB2z\xE2\xFA\xF9\x8B7\xAF\x9CG\xFA\xDB\xEA\xBBm\xF4\xD7\037\xDCA\020\x99\x82b\036\xB9\001\xC9\xF5K-\xC9\036\xE9\x9F\xE7\xB6\016l(\037\xE8@\xFD\015\xFE2\017\ -\xA1\xF3\xC2\xCE?I\xB6\x9E\036\xE2\x83\026\xC7\xCFt:\x82\xF7\033G\x8A2\x99/o ?Y?y\x9C\xA15\x93\xEE\001\x893X\xE3\xA0\xDEH\xD9\xDC/\xB6i|?}\xED[N\x8F\ -\xDB\xCC\xC9&\xFBt\xF8\x8A:\x91\xAD\x92\xE9Zr\027W\xF8\xF4\xA1o\x85.\xA7\x9F\xB1>\033:\xE4\xBF~\xB1L\xCD\xF9\010\0138\xBB\xCDg:\x91x\xE1z\x8C\xA7\xBB\xE2&\xB3t\xD6\xFA\x86\xBE\xEA#\ -+w\xBC\xAD\xBE\xC3\xEAw?&\x93\xA4\xDDy\xE1R?KZ\xF7P\xFC\xFF\023'\020\xA6\xE3\x9609?Q!\xB9j-\xAE~!\x89 \026\x9Ev\x892Pl\xDD\xCA?z:n\xC1\ -\xD0\014\xA9m\033\xC3\xD4=\036\xFB\xB4\xC8\007\xD6 n#E?\0159\xFF\022\xBC\x9D\xDDdx\xC8\021\x8F?4\0063?\x99j=\xF4\x8E1U\xDC\xDBQ\x9D\030?\x8D\xEAD\xB7\xF9\ -o\xDCl0\031\xEE#?\xD0g\xE1\xF8\xAE\x96\xF6\020\"\xBB\xE8\xCFC\xF24\036\x8F\xFF8\025\030\x91\xB3lE6\xFC\x8Az\012\xD6\xCCp\xA7\xA8\xC32vc\x8E\xCE5\017\xD21\xE3\026\x98\xA4\x9A3\ -u\xF2Ny\xB6f`\xA0\xF6\xEC`\xDA\000\010_+\x84\xF52\xBCPG@\xFAj\xA8f\x92\xABX\xAD0\xE8a\xA4\xF5\xE8\xED\xE8~\xE0\007\xF1t\002\xCF\xD3A}\003\xE6\006\xCF,\xAE\xE6\xF8\xEE\002d\ -R\x8Dd\x96\026%\xCB\034?\xE1\xA3\014\017\xE2\xDD{D\xF1=\015\027\x8D\xC3L\014\x98\xFEB\xD2\xE7bkv\0367\xE3\013O|1\xB2\xCF5\xF4?\014]u\x9F\xA9<\xC2=-\031oF\031\x9E\ -\xFAb\x94_93|\031?\x93$\024\x8B\xAA\014\xD3U\xD2\xDDM\xE1cR\xAD\xFB\xDC\xFB\xA8\xAFQ`,\xFE\x9A\xA6\xE1tm\xFE\x88\017\xCFf?\xEE9\x9B2i\x8Aga\xED~\014\xBE/\xB6\ -\xD3t\xAD\xAB\002\xC6M\x8D?z\xBA\xA9\033{4}\x90\xAC\025d\xA8\xBC\xA0<\xE4o\xFCA`k\x93q\011?Vsc\x92?bF\xE77r\xBC\x8DfLN\006=\023\xD3?\ -K\xC8)\xF0(f\002\012\035\x88\x93\xB18zr:~rzr\x8Cm{\xC7\032\x8Da\xE7\014\xA7\xAF_i\xB8Z\xAD\x86\xB6\x866L\xF3\xF9\x88?\xDF[mR\035\x8E\x98c\x83| \031,\xB9\ -\xD7s`\024M\xBEg_`\xD5\xD3\026\xF9%\030\xA0\xF5?4\xC1\xBF\xF8\x86nb\xCF\xED\x83l\"?\013Z\xA4\xB8\002I9\025\xBA)oK?J~z\x90>\xDFb\xB6\x9D\xD2U\ -g\x9B\xD3\024\xF8\xF1\0050\x8Fa\xE9?\031\xEB\x9B?\012\xC0\x95\002\xE7U\xD8\xDAX\x80:\xA4\xE1\x9A\xFE\x8C\036\xFDe?\xFF\005w\xB3H\xFE") +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/core_resources/ui_psp.py =================================================================== --- branches/python3/spambayes/spambayes/core_resources/ui_psp.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/core_resources/ui_psp.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,168 +1,10 @@ -# -*- coding: ISO-8859-1 -*- """Resource ui_psp (from file ui.psp)""" # written by resourcepackage: (1, 0, 0) source = 'ui.psp' package = 'spambayes.resources' -data = "Paint Shop Pro Image File\012\032\000\000\000\000\000\005\000\000\000~BK\000\000\000.\000\000\000.\000\000\000\xC2\001\000\000F\000\000\000j\ -\xBCt\x93X<@\002\002\000\030\000\001\000\000\000\000\001\000`\xE3\002\000\001\000\000\000\002\000\003\000\000%~BK\000\012\000\030\000\000\000~FL\000\001\000\016\000\000\000\xC0\xC0\xC0\000\012\000\000\000\ -\012\000\000\000\000\000~BK\000\001\0008\000\000\000~FL\000\001\000\004\000\000\000\xD4\xC3'>~FL\000\002\000\004\000\000\000\021\xF1}?~FL\000\006\000\004\000\000\000\001\000\000\000~F\ -L\000\007\000\004\000\000\000\004\004\000\007~BK\000\020\000g\035\000\000\010\000\000\000\002\000\000\000~BK\000\021\000\030\000\000\000\030\000\000\000\xC8\000\000\000\037\000\000\000\030\000\003\000\001\000\000\000\ -\000\001\001\000~BK\000\021\000\030\000\000\000\030\000\000\000\xC2\001\000\000F\000\000\000\030\000\003\000\001\000\000\000\000\001\000\000~BK\000\022\000\xFB\012\000\000\016\000\000\000\xED\012\000\000\xD0H\000\000\ -\005\000\xFF\xD8\xFF\xE0\000\020JFIF\000\001\001\000\001,\001,\000\000\xFF\xDB\000C\000\002\001\001\001\001\001\002\001\001\001\002\002\002\002\002\004\003\002\002\002\002\005\004\004\003\004\006\005\006\006\006\005\006\ -\006\006\007\011\010\006\007\011\007\006\006\010\013\010\011\012\012\012\012\012\006\010\013\014\013\012\014\011\012\012\012\xFF\xDB\000C\001\002\002\002\002\002\002\005\003\003\005\012\007\006\007\012\012\012\012\012\012\012\012\012\012\ -\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\xFF\xC0\000\021\010\000\037\000\xC8\003\001\"\000\002\021\001\003\021\001\xFF\ -\xC4\000\033\000\001\000\002\003\001\001\000\000\000\000\000\000\000\000\000\000\000\006\007\003\005\010\004\011\xFF\xC4\0005\020\000\002\002\001\004\001\002\004\002\007\011\000\000\000\000\000\001\002\003\004\005\000\006\007\021\022\010\ -!\023\024\"1\025Q\011\026\027#2A\x818BUaqv\x96\xB4\xD4\xFF\xC4\000\031\001\000\003\001\001\001\000\000\000\000\000\000\000\000\000\000\000\000\003\005\002\006\001\xFF\xC4\000*\021\000\002\001\003\004\ -\000\005\004\003\001\000\000\000\000\000\000\001\002\021\003\004!\000\005\0221\006\"AQa\023Bq\xB1#2\x81\xA1\xFF\xDA\000\014\003\001\000\002\021\003\021\000?\000\xFB\xF9\xAD}]?\xEFbmg\xA9\ -\xEE:2?5\x88\xAE\xDCKhb\xAE\xF5?uw\xEF\xA41\xBA:\xB8$x\x95 \xF5\xD1\xD6\xC3_8}A~\x8Eo[\x99P\x9B\xAB\x8Bx{\x96,\xC1?\xBB\xB9\xA7\xDC[\xAE\xD3\ -N\xAB\0362G\x99\xA5\x9A\031\"\xEC;\x92d\xE9V2\004\xC1c\022t#%z\x8F\013\xEC\x9BV\xFBqR\x95\xED\xEA\xDBq\001\x81pHe\007\xCE\004}\xE1r\xAB\xF7\021\xC7\xD6G7\xE2M\xE7s\ -\xD9hS\xABif\xD7\034\x89R\020\x89\004\x8F!3\xF6\x96\xC3\037\xB4\036^\x91\xAE\xC2\xF4\xBD\xEB\017\x8E\xFDZ??\x9F\011\xB4\xB2\xF0\xE3\xA0?t\xB9)\0322\xEF,k\xD7b0z\ -\012O\xBB\001\xE5\xD0\004j\xDC\xD4\027?\xA7N*\xF4\xB9\xC64\xF8\xA7\x88\xB6\xF2\xD2\xC7\xD6\xFA\xECN\xE7\xCA{\xB3\x90\003\xCF3\xFD\xDEF\xE8{\xFD\x80\001T\005\000\011?\xEFO\xB4\xBE\xE9P\xED\ -\x8A\xCBB at NfX\x80\000\x96\xF4\x96 \xB1\003\002``j\x96?\xA2m\xB4\xC6\xE2\xCA\xD5\xF2[\x8E\024\022I\x81\xF0\xA0\x85\004\xE4?\x9D5Z\xE5\xFDd\xFAO\xC0\xE7F\xDB\xCC\xFA\x8B\xD9\xD5\ -\xAEv\xE0\xC7.~\000\xA0\xA1*\xFD\xBF\x97\x88\xF1 \x86\xEC\xFB\020A\xEB\xADm=E\xF1\x9E\xE6\xE6\036\034\xCDq\xE6\xD0\xDE\015\x84\xBF\x90\x85\004V\xBE\xB1\034?\xAE?1\x95\x90C2\xA9\x8AC\ -\033+\x84\x91\xBCO~?yO\x8D\xFDio^t\xDA6$\xE1\xAD\xD7Cj\xEDIY\xE8m\xCC\"\xE1?>C\xA6H\xAC\xFC\xDCJ\xF1!\010`Y\xA3\xF6\020\xC6O\xC2,\xE1ox_a\ -\xD9\xF7uv\xBC\xB9Zq\xCB\005\xD5\016\026V9)\xE5?\xB0 (\004\xB1\xC8\006'\x897\xBD\xD7je[Kr\xF3\xC7!\013\x8C\xB44\xF1#\x8F\025?- \001\x82GzT\xB7S!R\ -+\xF4-G<\023?C4.\031$B;\014\xA4{\020A\004\021\xF7\xD6MV^\x95\xF8\x8Bup\xFE?\x8D\xDD\026+\xD5\xFC[9c'Gkcfi(\xED\xB8% \xAD\012\xCE\xDFS\ -\"\x90]\xBA\xF1\x8C<\x8E#DO\021\xAB7\\\xC5\xF5\012\026\xD7oJ\x8DNj\014\006\xF7\xFD\xFE0H\xF6$A\xD7GeZ\xB5?T\xAA\x9C\030\x8C\xAF\xB7\xEB\xFE\x80}\xC025P\xED?W\ -[gw\xE5p\xF3?\xB6\013=\x97lf;%\025\xE6y\xD6\xC7\xD1\xE0&\x80E\xE3\030\x88\x8C:\x91\x8F\x84\x88\xC4\016\xC8\026\xF6\xB9w\x89x\xB3\027\xC6^\xAE-z]\xFCJ\x{DF5B}\x8C\ -\xDA\xF4\xF7\xB6\xD0\xC7Y\020\xF7R\xE2?\xAC\x88eH\xD6I\0260\xB5\xFCC1 \020\030\xBF\x91\xD7Qj\xBF\x88\xED6\xDB;\x9Akf\017\026P\xC0\xC92\xAD\x95\x99\xE9\x80\xC3\001\x80F5+\xC3\ -\xF7[\x85?\xB5\xD9\034\x95\x8A\x91\000A\\4GjNT\x9C\x90s\xAD\017 \xF2>\xD7\xE3\xFF\000\x9E\xBDz\xC5J\x95\020\xF8\xCBQ\xE4I^\037/\xBF\x81x?\xFC\xD7[=4\xD6\xD9\xDD\xE3\x91&\004\017\x81\xEC>5\x95DI\xE2\"r~O\xBE\xB1]\xA5O%N\\~F\xA4S?6\x8Ex&\x8C\ -2H\x8C:*\xCA}\x88 \x90A\xFB\xEA\027\xB3\xBD4p\037\037\xEE\010wN\xCF\xE2\x8C5\033\xF5C\0126#\xAB\xE5\xF2A\x87D@\033\xB1\\\021\xED\xD4a}\xBD\xBE?\xE9\xA6?\xBB\xB7\xA6\ -\xD4\xE9TeV\xEC\002@?\x90;\xFF\000t\xAA\xB6\xB6\xB5\xEA+\xD4@?\022\001#\xF0O_?f\xF8\xB7fg\xB7,\xBB\xC6\xD5k\xD5\xF2\x96(\xC3J\xCD\xDCfj\xD57\x9A\xBC/+\ -\xC5\033\xFC\011S\xCC#O1_.\xFA2\xBF_s\xA9\016\x9A]*?\022i\xB1Rq\x83\037\xADn\xA5\032U\x80\025\024\020=\xC4\xEA3\xFB&\xDA\xDF?\xFEk\x94\xFF\000?\xE6\023\015\ -\x8B?j\x9B{\007I+R\xA1V:\xF4\xEBF>\x98\xA2E\012\x88?\xC8(\003\xFAk?\xB5R\xE6\xE2\xB2\xF1\xA8?N\xB3N\xDE?\x94@\017\xC0\003M4\xD3I?\xD3M4\ -h\xD3Q\037\xD8G\021\xFE\xD9?o\xD4z\xBF\xAEc\017\xF8W\xE3\xBEo\xF1>W\xCB\xCB\xC3\xC7\xCB?\xFD\xBC\xFC|\xFC~\x9F/\037mK\xB4?\xDC\\[\xF2\xFANW\x90*`\x91*{\ -\006;\007\xD4\034\035&\xAD\xBD\013\x8E?U\003q!\x84\x80`\x8E\x88\x9E\x88\xF4=\x8D4\xD3M'N\xD3M4?_\xFF\xD9~BK\000\022\000\014\022\000\000\016\000\000\000\xFE\021\000\000\xD8q\001\ -\000\010\000\xFF\xD8\xFF\xE0\000\020JFIF\000\001\001\000\001,\001,\000\000\xFF\xDB\000C\000\005\003\004\004\004\003\005\004\004\004\005\005\005\006\007\014\010\007\007\007\007\017\013\013\011\014\021\017\022\022\021\017\ -\021\021\023\026\034\027\023\024\032\025\021\021\030!\030\032\035\035\037\037\037\023\027\"$\"\036$\034\036\037\036\xFF\xDB\000C\001\005\005\005\007\006\007\016\010\010\016\036\024\021\024\036\036\036\036\036\036\036\036\036\ -\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\036\xFF\xC0\000\021\010\000F\001\xC2\003\001\"\000\002\021\001\003\021\001\ -\xFF\xC4\000\034\000\001\000\003\000\003\001\001\000\000\000\000\000\000\000\000\000\000\005\006\007\003\004\010\001\002\xFF\xC4\000F\020\000\001\003\003\002\003\005\003\010\006\006\013\000\000\000\000\001\000\002\003\004\005\021\006\022\ -\007!1\023\024\"AQ\0252a\010\026#Bq\x81\x91\xC13Vb\x95\xA1\xD2\027$&CR\xB278Ffuv\x84\xA5\xB1\xB4\xC2\xFF\xC4\000\033\001\001\000\003\001\001\001\001\000\000\000\000\000\000\ -\000\000\000\000\004\005\006\003\002\001\007\xFF\xC4\0002\021\000\001\003\002\004\004\004\006\002\002\003\000\000\000\000\000\001\000\002\021\003\004\005!1Q\022\023Aa\"q\x91\xA12R\x81\xB1\xC1\xF0\024B\006\025\ -\xD1\xE1\xE2\xFF\xDA\000\014\003\001\000\002\021\003\021\000?\000\xF6Z\"\"\"\"\"\"(\015w\xAB-Z:\xC6\xFB\x9D\xCEL\x93\x96\xC1\003O\x8Eg\xFF\000\x85\xBF\x99\xF2U\xFE\006\xEA{\x9E\xAE?K\ -\xC5\xD1\xED\xED\035u\x91\x91F\xDFv(\xC4Q\020\xC1\xF0\031?i$\xA9\xAD\xB0\xAC\xEBg]D0\020's\xD9Du\xF5\026\xDC\013i\xF1\x911\xB0\xEE\xAF?)h\x88\x88\x88\x88\x88\x88\x88\x88\ -\x88\x88\x88\x88\x88\xBF\023\xCB\034\020I<\xCFlq\xC6\xD2\xF7\xB9\xC7\001\xA0\014\x92P\011C\x92\xFD\xA2\xA4P\xDF\xEE\032\xA4\xCD5\xAE\xBAKM\xBA\010[.\xF8\xE1l\x953\xEE`\x90m\016k\x83@\x8D\ -\xF1\xB8\xF8\034s \034\xB1\xCF\xE6\x9B?q\xDC?\025?RV\006\x9Aj\xBF\006\xEF\026v\022\xE65\xAD{\\Z\xE6\xE7kK\\\000 \xEEiS?Uh3\0225\031\xCF\xDA4\xEF\ -\xEE\xA1\013\xFAD\x88\x98:\036\x9F\xF3\xED\xEC\xAF\010\x88\xA0)\xA8\x88\x88\x88\x8A\x93|\xD7S:\xF55\x83H?\xBF\xDC\xE08\xA9sd\021\xD3R\x9FG\xC8yn\xFD\x91\xE8GQ\x85\025\026\xA0\xE2C\ -\xAE/\xA3\x8EM\001UW\036K\xED\xD0\xD7K?\007PA8\037\x82\xB1f\027]\xCD\xE2q\015\xCAs \030\xDE:\016\xE6\002\xAF~%E\xAE\x86?d\011\023\xB4\xF5=\x84\xAD-\025GJk\ -h\xAEwWXoV?\025\xF5\xAD\xDF\xDC\xEA\034\034?:\xBA'\x8EO\037g?\012\xB7(\x95\xED\xEAPw\005A\007\xEF\xDC\035\010\xEE\024\xAA5\xE9\xD7o\0253#\xF7\"5\007\xB1DD\ -\\WdE\003\xF3\xD7F\xFE\xB6\xD8x\xC5\xFC\xC9\xF3\xD7F\xFE\xB6\xD8x\xC5\xFC\xCAG\xF1.>C\xE8W\017\xE5P\xF9?S?~z\xE8\xDF\xD6\xDB\017\xEF\030\xBF\x99rSj\xED)S\ -Q\03556\xA7\xB2M4\xAF\014\x8E8\xEB\xE2s\x9E\xE2p\000\001\xD9$\x9EXCi\\fX}\012\013\xAA' \xF1\xEA\024\xD2\"(\xEB\xBA\"*\005\004\xAF\xB3j\033\x85\xEA\xB0K'gUQO\ -t\x90\xBC\x9E\xCA'\xBD\xB2R\xCA\001\xFE\xED\x91\xF8N:\022\xE3\xE4\xE5\"\x85\xBF8:\016c\xDF\xF7O2\007U\036\xBD~Q\0222>?\xF9\002z+\xFA/\x8Ds\\\xD0\xE6\x90?A\xC8\ -!}Q?DDDEX\xBEk[m\xB2\xACR\xC5Gq\xB9\xC9?w\xF7(\x9A\xE6\xB2R\011\xD8\\\xE74\027`\022Z\xD2H\xC70\0276\x99\xD6\026\x8B\xFD?\xDBN\xEE?\x94\007\ ->\011'\x85\xEE-$\x8C\x8E\xCD\xEF\034\xB1\xCC\023\x91\x91\x902\024\xA3e\\S\xE6\026\xE4\xA3\013\xBA%\xFC\xB0\xEC?\021\024U%\021\026W\xC4\xDE2[\xB4\xBD\xCAk5\xAE\x87\xDAW\010|39\ -\xCF\xD9\024N\xFF\000\016G7\021\xE6\0061?.\xCA\xC6\xE2\xFA\xA7*\x83d\xA8\xB7\x97\xB4,\xE9\xF3+:\002\xD5\021a\xB7\016'\xF1:\xCBl\xA6\xBE^\xF4u\xBE+MAn?=\xAE\xC1\ -\031\031\xF1\xB8\xB7?\xB4?>\032q\002?he}\033$\xA5\xAC\xA7\xC7x\xA5\x90\x82Z\017G4\x8Fy\xBF\036_\0209)wX-?.q\000\xB0dKH \036\xF0\xA3[b\xF6\xD7\ -\025y \x90\xED`\x82\011\xF2\x95oDER\xAC\xD1\021\021\021\021\021\021\021\021\021\021\021\026G\xC7\xFDUu\xD2\027\xCD)t\xB5?;\xD3f\x85\xC7\xC13>\x87-p\xFC\xFC\x94\xEF\xF4\xB3\xA5~\ -c|\xE7\xEF\036/\xD1\xF7\035?\xED\xB1\xFA\xA5zo\x83ZB\xA3E\xE8\xE1m\xAD\x9D\xB2\xD5\xD4N\xEA\xA9\xC3=\xD8\xDC?\001\xF3\xC0h\xE7\xEB\x95\033\xC1\xBE\032R\xE8\ -\xDA!p\xB86:\x8B\xE4\xEC\xFAI\0076\xC0\xD3\xF5\031\xF9\xBB\xCF\xEC\xEB\xA3(\037\xE48\xDD;\x86\x8B;A\024\x9B\xEF\033v\xFB\xA9\xF8\026\017R\x83\x8D\xDD?\x8E\xF6\x9D\xFB\xFD\x91\021\026Mi\xD1\ -\021\021\024\006\xBC\xD5v\xFD!bu?\xAE\x9AG\xBB\xB3\xA6\xA6\x8F?C?\xF3>_\x80U\003f\xBA]\xA0\xA7\xB9q\037P\xD4?\xACyl6\x8A)\x8C\020D6:B\xD9^\xDEn\ -!\x8Cq$\x90\006\0175c\xE2f\x8Ff\xAE\xB3\xC2\xC8*\015\035?N\xDE\xDFT?\xBA\x90c\x91\xC7<\034\016\x9D0\017\x96\025\003R\xEA\xE9\xE7\xB26?\xED\xB2ZoT\xCEq\x8EG\x82)\ -k\xDAc|R\006\xC8\001\014.\x8EG\x8C\x9F\010$\022|\x86\x8B\014\xA2\037E\xBF\xC7\xF8\xE4\xF1|\xC0t\xE1\xED\xF3\021\x98\xEC\025\006#T\xB2\xAB\xB9\xFF\000\004\016\037\x94\x9E\xBC]\xF6\007#?>\ -\xBA\xD3ZgL\xEBX\xAD\xCCu\xCA&U\006\xCFI_%`\x92\x9D\xCDq8\016kZ?\x820\\\036N\006pz-\002\x8C\xEB\035)c\x87RX\xEB\xABo\x96F\007w\xFBM\xC2N?\ -\x94\xB1?\006I\xE7\xB5\xCDp\xE9\xE5\x9C\037,n\x9A?\x85l\002\xA3T6\xB6\x82)\011\x8A\x87d\x91\xCCry\xB4\x97\016?\xE0e\xC1\xEE\xF5\000\xF4[-\036\xA5\xBB\xDE\xEC-\xD2\xFA\016\031\ -+*\xA7t\xAE\xB8^\xDD\033\xA3\xA5\xA7|\xAFt\x92\x98?\\w=\xD8\xE5\x9C`\x8C\xF9j1Ju\005:L>0>\"\xF0Cc|\xF3\007\xC8\xEB\xF0\xF5\0137\x86\xBE\x99\xA9Q\xC3\xC0\xA8\ -i\004\xCE\xD9dG\x9FO\x8B\xA1Zv\x97\xBE[\xF5%\x8E\x9A\xF1k\x97\xB4\xA6\xA8nFy9\xA7\xA1k\x87\x91\007\x92\x93PZ\017K\xD0\xE9\0155Oe\xA0%\xE1\x99|\xB2\xB8`\xCB!\xF7\x9C\ -\000\000\xF2\000\005:\xBF<\xB9\024\x85g\012&[&'X??\xD3Tx\xA38\xDD\024f\xAC\xA2\x9A\xE5\xA5n\xF6\xEAc\x89\xEA\xA8f\x823\x9Cx\x9C\xC2\xD1\xFCJ\x93E?\xCB\034\ -\0345\013\xA3\xD8\036\xD2\xD3\xD5a\xBC\034\xB9A-\xD6\xD6?QT??\xC31\xDAK\xC4\021\xC2\xE8\x8Ez;\024\xD4\xEF\000\xF5\xFA at 9\xB0\xABM\xDE\xD9\0335u\xA6\xCBo\xE6a\x99\xD5\ -\016\003\031\001\xF5\xB1\xD5\xC8\xE2>\xAB\033\xD9\006\002y\023(\00388\x8A\xF9E\xE9{c4\x95^\xA7\xA1\xA5m-?\xC6*j!%\x86X\xDCv\xE1\xC0\034;\x99o23\xC9[\xB86\xDBd\ -\x9C;\xB4\xD6[()\xE9\033<\000H\"\x8C4\xB9\xCC%\x84\xB8\x81\xE29\007\x99\xE6V\xA6\xF2\xBB\035 at b\024\xA6\011\xE1\xE1\xE8\035\004\xEB\xD4fc/E\x99\xB4\xA0\xF6\xD66\025\"@\xE2\xE2\xEAD\ -\x81\xA7M\004\xE7\xEA\xAE\010\x88\xB2kP\x8A\xA5?\xCDm\x9FGH-\x8E\xD9r\xAF\x9E:\0127g\033d\x94\xE3?h\033\x88\xF8\x80\xAD\xAA\x85\xC6\xF0\xE84\xED\xA6\xF3\xB4\xBA\033=?p\006\ -|\015qi\xFF\0008S\xB0\xC65\xF7t\xDA\xE19\x8C\xB7\xD8}NJ\026\"\xF72?\x9Ac-v\xDC\xFD\002\xB2\xE8\xED=A\xA5\xF4\xFD=\xA2\xDE\xC0\031\023s$\x84x\xA6\x90\xFB\xCFq\xF3$\ -\xFEC\xA0X\xA6\x90\xE1\xAD=\017\025)\xE6n\xBA\xB2?J\xD7J\xDAx\xAA?ds\011qc\xD9\xE4y\035\xDC\xCF,\xF2^\x81\x8AFK\023%\x89\xED{\036\xD0? \x83?\xE6\x9D\ -\007\xFE\xB4\025\037\xF1k\x97\xF9gWx%K\x8A\x8C\xBBx\xA9\007\x80\x93\x903\xAE\xEA\x9F\030\xA7B\x9B\xEDXY#\x88\001\x99\021\xA6\xCBo\xE2v\x9Cn\xA0\xD3R\xBE\x9C\x98n\xB4\000\xD5[\xAAY\xC9\ -\xF1L\xDE`\003\xE8q\x83\xF8\xF9\005\xDE\xD0w\xBF\x9Cz:\xD7z 5\xF5T\xE1\xD2\001\xD0\xBF\005c]{\x8D\015\025?\xF4w\032:z\xCAg\xE0\xBA\031\xE2\0221\xD89\031i\004\036|\xD7\032\0259u\003\xBF|\xC7q\xA8]\xAB\xD3\xE60\xB7\xF7\xCB?\xF3\ -M\xD3\xD6\xE8\x89-V\xDA\012v\xC7J\xE6O\015\024l,\x86M\x8E\xDCc,f2\017?\017,\x9Cs\035U\"\013\x95\xC2N\xE1{\xA2\xAAd\x96\xDB,?\x96\x99\x8F\x81\xA2\x8E\035\xA5\x93\003\014\ -Q\035\x98\x89\xCF!\x8E\x9C\xBB#;N0\xAFE\x91i\032\xBD\xF1F?\xF5C\x86\xF6\xB0a\x94\022\036[\x80\xFA\xB1;\x96q?\xE7\xD1?\013m\xB9\xF7\xAA?=\xEA\xEFp\xAAm5l\ -\x8Du\0011\xC7\007dN\xF8\x87\x81\x81\xCFn\xC74\035\xCE \x90\xE0s\xCC+\x8Bk\x8EU#\xC7\xE2f\xB2u\xCF'e\x9E}\016c^\xA0\x85SqC\x99Ppx]\xA4\0152\xCCg\x96]F\ -GN\x84\025nDEB\xAE\xD1f\027\xBE\010iK\xB5\xE6\xB6\xEBSp\xBD\xB6z?*$lsD\032\034\xF7\027\0203\0318\xC9\xF5+OQ:\xCC\xD6\015\037z6\xF6\xCA\xFA\xC1o\x9F\xBB\xB6\ -&\x97<\xC9?hh\034\xC9\xCE0\002\x9DawqoR(?\x84\xBA\004\xA8w\xB6\xB4.)\xCDfq\006?=\xF12\xCDq\xB2\xD5\xE9\013(5n|\xADmMH\037F?\016\xDA\ -\xC3\xF5\x8E?\x98?\xDF?F?s\xD5\xEAk\x9C\022RGSM\xDD?a\xD24\xB9\xAE/#\xC8x@\036\xB9>X\xCD#\x83\x9A2\xF8\xCE%Y\xE4\xBD\xE9{\xA4T1\ -\xBEI\036\xFA\x9A\031\031\033\\\xD8\xDEXIsq\xEF\006\xE3>x^\xA7Z\x8Cj\xE6\x8E\027j0\xDBL?\xB9\xD3=\xBF\036\x9E\xAB7\x84[\xD5?\xD8]dZa\xAD\x88\xEF\xF9\xF5DD\ -X\x95\xB0DDDDDDDDDDDDE\037\xECKO\xB7\xBD\xBD\xEC\xFAi\xF6]\x8Fy\xDB\xE3\xD9\xE9\x9F?\xE5\xD1H\"\xF4?\xB3\xC2bW\x971\xAE\x8E!0\x88\x88\xBC\xAF\ -H\x88\x88\x88\x88\x88\x88\xB8\xEAi?\xD0T\xC1\024\xF1;\xDEd\x8C\016i\xFBA\\\x88\xBE\x82A\x90\xBE\020\016EB7Hi6K?K\xD9\033&s\xBCPD\017\xE3\xB5L\xC5\033\"\x8D\ -\xB1\xC4?\x8D\030kZ0\000\xF8\005\xFAE\xED\xF5jT\xF8\xDCO\x99^YI\x8C\xF8@\010\x88\x8B\x9A\x{188208}\xAA\xFCY\xB7\xBE\xE7\xC3{\xF5$q\xBAI\015#\xA4c\0322\\\xE6x\xC0\003\ -\xCC?\xF2j\xA8\x96n\030E\024\x8C{E=\\?p\xC6A!\xD9\036\xA3.#\xED\005i\x88\xA7\xB6\xF8\x8B'Z\026\xE4\\\035;e\032(.\xB2\x9B\xC6\xDD\007h\xD2\xD8\xDF9DDP\ -\024\xE4\\\027\032:k\x85\004\xF45\xB0\xB6jj\x88\xDD\034\xB1\xBB\xA3\x9AF\010\\?Zd/\x84\002 \xAC\xCE\xDFS\xA8\xF8p=\x97[n\xAD\xBF\xE9\x88\xCF\xF5:\xCAFv\x954\x8C\xF2\x8E\ -F}f\x8F'\016\x83\xEE\003/\xD3U\xF6[w\030\xE5\xD5\xEE\xBD\xC1S\003\xEB\xAA\xEA\005\024\024\xB5&\xAB\022\x89\003[\xB4\xC4\033\xBB\xC63\xE2\xF5\xE6W\xA7\021_[\xE3m\xA6*q\xD3\xF1\xDF|3\xD6\xC6?3\xC8FZNFA\007\xEFS\xD7\012\xDE\024\\k\037Yp\xAB\xD1Uu2c|\xD3\xC9J\xF7\xBB\000\001\x97\036g\000\001\xF7+\xAA+*\xD7\xD4\xEA\ -\\>\xBBZ\xE6\x97\022rv\xE6~U_F\xCD\xF4\xE82\x89-!\xA0\014?\x8F\x99R\xAD\xF5\xBC(\xB7V2\xB2\xDFW\xA2\xA9*c\xCE?\x92\x95\x8FnA\007\016\034\xC6A#\xEFP\x9CN\ -\xD46\013\xB5F\x8E\xA6\xB5_-\x95\xF37T?\xD1\xD3U\xB2W\006\x82\xF1\x92\032I\xC6H\031\xF8\x85\xA8\"R\xBDe:\xA2\xA9k\x89\033\xBB\xFF\000)R\xCD\xEF\xA4i\002\000;7\xFE\xD1\021\025\ -j\xB0DDDDDDDDD_\x99cd\xB1:)X\xD7\xC6\xF0Z\xE6\xB8d8\036\xA0\x85]\xD1v\032\xEB9\x9AK\x85L3I?\xA2\x84D\016\0040o\xD8\\OW\x9D\xE7?p\xE7\ -\x8C\xAB\".\xAD\xAC\xF61\xD4?'\xE8\xB9:\x93\\\xF6\xBC\xEA?(\x88\x8B\x92?\xAC\x9A\xDFb\xB8W\xD3?\x89\xA9\xA9\xA4\x9A8GY\034?\033\xF7\x91\x85\xDDE\xE9\xA4\007\002D\ -\xAF.\004\x82\001\x85\x83p_\x89?Q\xEB\xD6Z.\xF2EWGT\xC9\036C k;\xB6?\002\013FH\xC8\015\xF1g\xA8??\xB4Zm\xF5\023TP[(\xA9&\x9C\xE6i \ -\x81\xACt\x87\xF6\x88\031?z\xEE\xAB\014V\xEE\xDE\xEE\xBF2\x85!M\xB0\004\015\xF7Pp\xCBZ\xF6\xB4x+\xD4\xE32s?dDEZ\xAC\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\ -\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\ -\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\ -\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\021\027\xFF\xD9~BK\000\003\0008\007\000\000~\ -BK\000\004\000\x8D\001\000\000\x83\000\000\000\012\000Background\001\000\000\000\000\000\000\000\000\xC2\001\000\000F\000\000\000\000\000\000\000\000\000\000\000\xC2\001\000\000F\000\000\000\xFF\000\ -\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\ -\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\010\000\000\000\001\000\003\000~BK\000\005\000L\000\000\000\020\000\000\000<\000\000\000\xD8q\001\000\000\000\001\000x\x9C\xEC\xC1\x81\000\ -\000\000\000\xC3 \xEA]\xE0\010U\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\xC07\000\000\000\xFF\xFF\003\000\xBB%\x98\033~BK\000\005\000\ -L\000\000\000\020\000\000\000<\000\000\000\xD8q\001\000\000\000\002\000x\x9C\xEC\xC1\x81\000\000\000\000\xC3 \xEA]\xE0\010U\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\xC07\000\000\000\xFF\xFF\003\000\xBB%\x98\033~BK\000\005\000L\000\000\000\020\000\000\000<\000\000\000\xD8q\001\000\000\000\003\000x\x9C\xEC\xC1\x81\000\000\000\000\xC3 \xEA]\ -\xE0\010U\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\xC07\000\000\000\xFF\xFF\003\000\xBB%\x98\033~BK\000\004\000\x97\005\000\000}\000\000\000\ -\004\000Text\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\xFF\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\xFF\000\000\xFF\ -\xFF~BK\000\015\000\010\005\000\000\010\000\000\000\001\000\000\000~BK\000\016\000\xF6\004\000\000\024\000\000\000\000\000\001\000\007\000\000\000\001\000\000\000\000\000\000\000U\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\000\000\000\000\000\000\000\000\034@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000B@\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\xF0?\010\000\000\000\016\000\000\000\006\000\000\000\003\000\010\000\000\000\000\000\000\000\006\000\000\000\002\000Y\000\000\000\010\000Webdings\000\000\000\000\ -\x90\001\000\000\002\000\000\0005\000\000\000\000UUUUUU5@\000\001\000\001\000\000\001?p=\012\xD7\034@?p=\012\xD7\034@\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\ -\xF0?\000\000\000\000\000\000\000$@~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\000\000\000\xFF\xFF\xFF\xFF~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\ -\xF6\000\xFF\xFF\xFF\xFF~BK\000\023\000-\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\006\000\000\000\001\000\010\000\000\000a\000\000\000\006\000\000\000\002\000Y\000\000\000\010\000Webdings\000\000\000\000\x90\001\000\000\002\000\000\000%\000\000\000\000\xDE\xDD\xDD\xDD\xDD\xDD-\ -@\000\001\000\001\000\000\001?p=\012\xD7\034@?p=\012\xD7\034@\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\000$@~BK\000\017\000\022\000\000\ -\000\006\000\000\000\001\000\014\000\000\000\000\000\000\000\xFF\xFF\xFF\xFF~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\xF6\000\xFF\xFF\xFF\xFF~BK\000\023\000-\000\000\000-\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\001\000\010\000\000\000N\000\000\000\006\000\000\000\ -\001\000\010\000\000\000L\000\000\000\006\000\000\000\001\000\010\000\000\000i\000\000\000\006\000\000\000\002\000Y\000\000\000\010\000Webdings\000\000\000\000\xBC\002\000\000\002\000\000\000%\000\000\000\ -\000\xDE\xDD\xDD\xDD\xDD\xDD-@\000\001\000\001\000\000\001?p=\012\xD7\034@?p=\012\xD7\034@\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\000$@~\ -BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\000\000\000\xFF\xFF\xFF\xFF~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\xF6\000\xFF\xFF\xFF\xFF~BK\000\023\ -\000-\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\001\000\010\000\000\000\ -\x9B\000\000\000\006\000\000\000\002\000Z\000\000\000\011\000Wingdings\000\000\000\000\x90\001\000\000\002\000\000\000%\000\000\000\000\xDE\xDD\xDD\xDD\xDD\xDD-@\000\001\000\001\000\000\001?p\ -=\012\xD7\034@?p=\012\xD7\034@\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\000$@~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\ -\000\000\000\000\xFF\xFF\xFF\xFF~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\xF6\000\xFF\xFF\xFF\xFF~BK\000\023\000-\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\001\000\010\000\000\000C\000\000\000\006\000\000\000\001\000\010\000\000\000D\000\000\000\006\ -\000\000\000\002\000Y\000\000\000\010\000Webdings\000\000\000\000\x90\001\000\000\002\000\000\000#\000\000\000\000\xBB\xBB\xBB\xBB\xBB\xBB+@\000\001\000\001\000\000\001?p=\012\xD7\034@\xD7\ -\xA3p=\012\xD7\034@\000\000\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\xF0?\000\000\000\000\000\000\000$@~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\000\000\000\xFF\xFF\ -\xFF\xFF~BK\000\017\000\022\000\000\000\006\000\000\000\001\000\014\000\000\000\000\xF6\000\xFF\xFF\xFF\xFF~BK\000\023\000-\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\001\000\010\000\000\000s\000\000\000\010\000\000\000\000\000\000\000~BK\000\006\000r\000\000\000$\000\000\ -\000o\001\000\000\005\000\000\000\x98\001\000\000.\000\000\000\000\000\000\000\000\000\000\000)\000\000\000)\000\000\000\010\000\000\000\001\000\001\000~BK\000\005\000<\000\000\000\020\000\000\000,\000\000\0004\ -\013\000\000\003\000\000\000x\x9CJ\x9AG\034H\x9A\xF7\x9F80oT\xE1\xA8\xC2Q\x85\xA3\012G\025\x8E*D(\xB4I$\016\xD8\000\000\000\000\xFF\xFF\003\000\xFC3C\xA3" + + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/dnscache.py =================================================================== --- branches/python3/spambayes/spambayes/dnscache.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/dnscache.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -60,7 +60,7 @@ # (seq[i].attr, i, seq[i]) and sort it. The second item of tuple is needed not # only to provide stable sorting, but mainly to eliminate comparison of objects # (which can be expensive or prohibited) in case of equal attribute values. - intermed = map(None, map(getattr, seq, (attr,)*len(seq)), xrange(len(seq)), seq) + intermed = zip([getattr(s, attr) for s in seq], xrange(len(seq)), seq) intermed.sort() return map(operator.getitem, intermed, (-1,) * len(intermed)) Modified: branches/python3/spambayes/spambayes/languages/fr/i18n_ui_html.py =================================================================== (Binary files differ) Modified: branches/python3/spambayes/spambayes/resources/classify_gif.py =================================================================== --- branches/python3/spambayes/spambayes/resources/classify_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/resources/classify_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,26 +1,8 @@ -# -*- coding: ISO-8859-1 -*- """Resource classify_gif (from file classify.gif)""" # written by resourcepackage: (1, 0, 0) source = 'classify.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\xFE\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9CH\xB1\xA2?\022o\x98\xB8\xD0\xC0\000\x80\x8F\006\030\\(q\003\xE3\017\024\015>\ -\xAA\\\xB9\xB2\001\x8A\037\024]$\xF8\xD8@\004\x8D\023+\003<\030\021!\xC0\xC7\004-\"\xFA\xD0\xF0\xF1\001\x8C\x81>X\xF0\000\x92\xC3\004\002\005:n`\xF0\011 \x83\017\x87=\036\000\010@\xE2`J\ -\003\034t<\x88 \x90\006\x83\xA2;\030f?b ?\034TBE\xC0B\xA0\x8F\0134{,\xAC\xF01\005A\0072\006?\012\xA0\xC3\011\011\004\xE3\002\xA0\xA0\020\xC5G\014\005\005\xECx\020\ -B\007\020\012*\017\xEC @\xF0\x87\x84\x8F(\022\"\xF8X\x92 \000 \037\005\x8C\\\x89\xBA\xA0\x8D\x8F\010\022:\006 \xE1\xAD\xC0\0029F\xB3\004\xA0\x993A\xCC\000B'\xE4\013\x80\003\xC1\012'>\ -\xEC\006\xE0!\005\xE2\x81\xCA\027/\\\013\000\xC3U 0\020\x88e\xF9@\x87\x82\xBA\002\xA3p?\xD0;]+\000\0064\004Z\xE8\xEE\xE1\000o\017:*\x90\005\xA2\xE33\x80\xF1\016\020?\001G\ -V\004'\xA4\xB5\003\012\011@\xC5\003\010\004|\xA4\xC1u\017\xC9\xF4Q\000\022\x94 \001a\001@@\xC2\005\002\xFC\024\xD4D'\xA5\xB4\034K.\xD9V\x91F\034y\004\x92H$a\xA4\xE2\x8A,\xB6\xE8\ -\xE2\x8B0\xC6(\xE3\x8C4\xD6h\xE3\x8D8\xE6\xA8\xE3\x8E+\006\004\000;" -### end + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() Modified: branches/python3/spambayes/spambayes/resources/config_gif.py =================================================================== --- branches/python3/spambayes/spambayes/resources/config_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/resources/config_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,22 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource config_gif (from file config.gif)""" # written by resourcepackage: (1, 0, 0) source = 'config.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000,\000\000\000\000(\000(\000\000\010\x9B\000\x81\010\034H\xB0\xA0\xC1\x83\010\023*\\?\xA1?\020#J\x9C\010\x84\003E\x89\034\000\\\x84\x98Q\xE3?\035=~T\030R\xE4?%M\ -\x9E$\x98R%C\x8B \001?\xE9r!\000\x98$i?(\023'J\x9D;!\xCE\xF4\xC9\022\xE8P\x9EG\013\xB6L*\x94\xA6?='\002\x85\011\xF5&E\xA3\034\xAA\022mj\xB4\xEBV\ -\xAE]u~\xE5\030V\xEC?LG\xA2\035{\021*?-\xDF~,)Wm?$\xEB\xE2\xDD?\xAF?\x80\003\013\036L\xB8\xB0\xE1\x8B\001\001\000;" + +import os +datafile = os.path.join(os.path.dirname(__file__), source) +data = open(datafile, "rb").read() ### end Modified: branches/python3/spambayes/spambayes/resources/help_gif.py =================================================================== (Binary files differ) Modified: branches/python3/spambayes/spambayes/resources/message_gif.py =================================================================== --- branches/python3/spambayes/spambayes/resources/message_gif.py 2009-11-06 01:20:54 UTC (rev 3252) +++ branches/python3/spambayes/spambayes/resources/message_gif.py 2009-11-09 02:30:03 UTC (rev 3253) @@ -1,22 +1,9 @@ -# -*- coding: ISO-8859-1 -*- """Resource message_gif (from file message.gif)""" # written by resourcepackage: (1, 0, 0) source = 'message.gif' package = 'spambayes.resources' -data = "GIF89a(\000(\000\xF7\000\000\000\xF6\004\x81\xF6\010\x83\xF6\014\x85\xF6\020\x87\xF7\024\x89\xF7\030\x8B\xF7\034\x8D\xF7 \x8F\xF7$\x91\xF7(\x93\xF7,\x95\xF80\x97\xF84\x99\xF88\x9B\xF8<\x9D\ -\xF8@\x9F\xF8D\xA1\xF8H\xA3\xF9L\xA5\xF9P\xA7\xF9T\xA9\xF9X\xAB\xF9\\\xAD\xF9`\xAF\xF9d\xB1\xFAh\xB3\xFAl\xB5\xFAp\xB7\xFAt\xB9\xFAx\xBB\xFA|\xBD\xFA\x80\xBF\xFB\x84\xC1\xFB\x88\xC3\xFB\x8C\xC5\ -\xFB\x90\xC7\xFB\x94\xC9\xFB\x98\xCB\xFB\x9C\xCD\xFC\xA0\xCF\xFC\xA4\xD1\xFC\xA8\xD3\xFC\xAC\xD5\xFC\xB0\xD7\xFC\xB4\xD9\xFC\xB8\xDB\xFC\xBC\xDD\xFD\xC0\xDF\xFD\xC4\xE1\xFD\xC8\xE3\xFD\xCC\xE5\xFD\xD0\xE7\xFD\xD4\xE9\xFD\xD8\xEB\xFE\xDC\xED\ -\xFE\xE0\xEF\xFE\xE4\xF1\xFE\xE8\xF3\xFE\xEC\xF5\xFE\xF0\xF7\xFE\xF4\xF9\xFF\xF8\xFB\xFF\xFC\xFD\xFF\xFF\xFF\xFF\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. From montanaro at users.sourceforge.net Mon Nov 9 03:59:11 2009 From: montanaro at users.sourceforge.net (montanaro at users.sourceforge.net) Date: Mon, 09 Nov 2009 02:59:11 +0000 Subject: [Spambayes-checkins] SF.net SVN: spambayes:[3254] branches/python3/spambayes Message-ID: Revision: 3254 http://spambayes.svn.sourceforge.net/spambayes/?rev=3254&view=rev Author: montanaro Date: 2009-11-09 02:59:10 +0000 (Mon, 09 Nov 2009) Log Message: ----------- First pass with 2o3. Haven't tested it yet. The proof will be to see how many other changes are required from this point on... Modified Paths: -------------- branches/python3/spambayes/Outlook2000/addin.py branches/python3/spambayes/Outlook2000/config.py branches/python3/spambayes/Outlook2000/config_wizard.py branches/python3/spambayes/Outlook2000/dialogs/FolderSelector.py branches/python3/spambayes/Outlook2000/dialogs/__init__.py branches/python3/spambayes/Outlook2000/dialogs/async_processor.py branches/python3/spambayes/Outlook2000/dialogs/dialog_map.py branches/python3/spambayes/Outlook2000/dialogs/dlgcore.py branches/python3/spambayes/Outlook2000/dialogs/opt_processors.py branches/python3/spambayes/Outlook2000/dialogs/processors.py branches/python3/spambayes/Outlook2000/dialogs/resources/rc2py.py branches/python3/spambayes/Outlook2000/dialogs/resources/rclabels2text.py branches/python3/spambayes/Outlook2000/dialogs/resources/rcparser.py branches/python3/spambayes/Outlook2000/dialogs/test_dialogs.py branches/python3/spambayes/Outlook2000/dialogs/win32struct.py branches/python3/spambayes/Outlook2000/dialogs/wizard_processors.py branches/python3/spambayes/Outlook2000/export.py branches/python3/spambayes/Outlook2000/filter.py branches/python3/spambayes/Outlook2000/manager.py branches/python3/spambayes/Outlook2000/msgstore.py branches/python3/spambayes/Outlook2000/sandbox/delete_outlook_field.py branches/python3/spambayes/Outlook2000/sandbox/dump_email.py branches/python3/spambayes/Outlook2000/sandbox/dump_profiles.py branches/python3/spambayes/Outlook2000/sandbox/dump_props.py branches/python3/spambayes/Outlook2000/sandbox/extract_bad_msg_from_log.py branches/python3/spambayes/Outlook2000/sandbox/extract_prop.py branches/python3/spambayes/Outlook2000/sandbox/find_dupe_props.py branches/python3/spambayes/Outlook2000/sandbox/mapi_driver.py branches/python3/spambayes/Outlook2000/sandbox/score.py branches/python3/spambayes/Outlook2000/sandbox/set_read_flag.py branches/python3/spambayes/Outlook2000/tester.py branches/python3/spambayes/Outlook2000/train.py branches/python3/spambayes/contrib/SmarterHTTPServer.py branches/python3/spambayes/contrib/bulkgraph.py branches/python3/spambayes/contrib/findbest.py branches/python3/spambayes/contrib/mod_spambayes.py branches/python3/spambayes/contrib/nway.py branches/python3/spambayes/contrib/pycksum.py branches/python3/spambayes/contrib/sb_culler.py branches/python3/spambayes/contrib/showclues.py branches/python3/spambayes/contrib/spamcounts.py branches/python3/spambayes/contrib/tte.py branches/python3/spambayes/pspam/pop.py branches/python3/spambayes/pspam/pspam/folder.py branches/python3/spambayes/pspam/pspam/profile.py branches/python3/spambayes/pspam/scoremsg.py branches/python3/spambayes/scripts/core_server.py branches/python3/spambayes/scripts/sb_bnfilter.py branches/python3/spambayes/scripts/sb_bnserver.py branches/python3/spambayes/scripts/sb_client.py branches/python3/spambayes/scripts/sb_dbexpimp.py branches/python3/spambayes/scripts/sb_evoscore.py branches/python3/spambayes/scripts/sb_filter.py branches/python3/spambayes/scripts/sb_imapfilter.py branches/python3/spambayes/scripts/sb_mailsort.py branches/python3/spambayes/scripts/sb_mboxtrain.py branches/python3/spambayes/scripts/sb_notesfilter.py branches/python3/spambayes/scripts/sb_pop3dnd.py branches/python3/spambayes/scripts/sb_server.py branches/python3/spambayes/scripts/sb_unheader.py branches/python3/spambayes/scripts/sb_upload.py branches/python3/spambayes/scripts/sb_xmlrpcserver.py branches/python3/spambayes/setup.py branches/python3/spambayes/spambayes/CoreUI.py branches/python3/spambayes/spambayes/Corpus.py branches/python3/spambayes/spambayes/CostCounter.py branches/python3/spambayes/spambayes/Dibbler.py branches/python3/spambayes/spambayes/FileCorpus.py branches/python3/spambayes/spambayes/Histogram.py branches/python3/spambayes/spambayes/ImageStripper.py branches/python3/spambayes/spambayes/ImapUI.py branches/python3/spambayes/spambayes/MoinSecurityPolicy.py branches/python3/spambayes/spambayes/Options.py branches/python3/spambayes/spambayes/OptionsClass.py branches/python3/spambayes/spambayes/ProxyUI.py branches/python3/spambayes/spambayes/PyMeldLite.py branches/python3/spambayes/spambayes/ServerUI.py branches/python3/spambayes/spambayes/Stats.py branches/python3/spambayes/spambayes/TestDriver.py branches/python3/spambayes/spambayes/TestToolsUI.py branches/python3/spambayes/spambayes/UserInterface.py branches/python3/spambayes/spambayes/Version.py branches/python3/spambayes/spambayes/XMLRPCPlugin.py branches/python3/spambayes/spambayes/cdb.py branches/python3/spambayes/spambayes/cdb_classifier.py branches/python3/spambayes/spambayes/chi2.py branches/python3/spambayes/spambayes/classifier.py branches/python3/spambayes/spambayes/compatcsv.py branches/python3/spambayes/spambayes/compatheapq.py branches/python3/spambayes/spambayes/compatsets.py branches/python3/spambayes/spambayes/dbmstorage.py branches/python3/spambayes/spambayes/dnscache.py branches/python3/spambayes/spambayes/hammiebulk.py branches/python3/spambayes/spambayes/i18n.py branches/python3/spambayes/spambayes/mboxutils.py branches/python3/spambayes/spambayes/message.py branches/python3/spambayes/spambayes/msgs.py branches/python3/spambayes/spambayes/oe_mailbox.py branches/python3/spambayes/spambayes/port.py branches/python3/spambayes/spambayes/postfixproxy.py branches/python3/spambayes/spambayes/safepickle.py branches/python3/spambayes/spambayes/smtpproxy.py branches/python3/spambayes/spambayes/storage.py branches/python3/spambayes/spambayes/test/test_Corpus.py branches/python3/spambayes/spambayes/test/test_FileCorpus.py branches/python3/spambayes/spambayes/test/test_message.py branches/python3/spambayes/spambayes/test/test_programs.py branches/python3/spambayes/spambayes/test/test_sb_dbexpimp.py branches/python3/spambayes/spambayes/test/test_sb_filter.py branches/python3/spambayes/spambayes/test/test_sb_imapfilter.py branches/python3/spambayes/spambayes/test/test_sb_pop3dnd.py branches/python3/spambayes/spambayes/test/test_sb_server.py branches/python3/spambayes/spambayes/test/test_smtpproxy.py branches/python3/spambayes/spambayes/test/test_stats.py branches/python3/spambayes/spambayes/test/test_storage.py branches/python3/spambayes/spambayes/tokenizer.py branches/python3/spambayes/testtools/cmp.py branches/python3/spambayes/testtools/es2hs.py branches/python3/spambayes/testtools/fpfn.py branches/python3/spambayes/testtools/incremental.py branches/python3/spambayes/testtools/mboxtest.py branches/python3/spambayes/testtools/mkgraph.py branches/python3/spambayes/testtools/mksets.py branches/python3/spambayes/testtools/rates.py branches/python3/spambayes/testtools/regimes.py branches/python3/spambayes/testtools/simplexloop.py branches/python3/spambayes/testtools/sort+group.py branches/python3/spambayes/testtools/table.py branches/python3/spambayes/testtools/timcv.py branches/python3/spambayes/testtools/timtest.py branches/python3/spambayes/testtools/weaktest.py branches/python3/spambayes/utilities/HistToGNU.py branches/python3/spambayes/utilities/cleanarch.py branches/python3/spambayes/utilities/convert_config_file.py branches/python3/spambayes/utilities/convert_db.py branches/python3/spambayes/utilities/dump_cdb.py branches/python3/spambayes/utilities/export_apple_mail.py branches/python3/spambayes/utilities/extractmessages.py branches/python3/spambayes/utilities/hammer.py branches/python3/spambayes/utilities/hammie2cdb.py branches/python3/spambayes/utilities/loosecksum.py branches/python3/spambayes/utilities/mboxcount.py branches/python3/spambayes/utilities/mkreversemap.py branches/python3/spambayes/utilities/pop3graph.py branches/python3/spambayes/utilities/rebal.py branches/python3/spambayes/utilities/split.py branches/python3/spambayes/utilities/splitn.py branches/python3/spambayes/utilities/splitndirs.py branches/python3/spambayes/utilities/which_database.py branches/python3/spambayes/windows/autoconfigure.py branches/python3/spambayes/windows/pop3proxy_service.py branches/python3/spambayes/windows/pop3proxy_tray.py branches/python3/spambayes/windows/py2exe/gen_py/office-9.py branches/python3/spambayes/windows/py2exe/gen_py/outlook-9.py Modified: branches/python3/spambayes/Outlook2000/addin.py =================================================================== --- branches/python3/spambayes/Outlook2000/addin.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/addin.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -3,7 +3,7 @@ import types import warnings import traceback -import _winreg +import winreg from types import UnicodeType # *sigh* - this is for the binary installer, and for the sake of one line @@ -35,7 +35,7 @@ import win32gui, win32con, win32clipboard # for button images! -import timer, thread +import timer, _thread from dialogs.dlgutils import SetWaitCursor @@ -106,9 +106,9 @@ try: from win32com.client import CastTo, WithEvents except ImportError: - print "*" * 50 - print "You appear to be running a win32all version pre 151, which is pretty old" - print "I'm afraid it is time to upgrade" + print("*" * 50) + print("You appear to be running a win32all version pre 151, which is pretty old") + print("I'm afraid it is time to upgrade") raise # we seem to have all the COM support we need - let's rock! @@ -134,18 +134,18 @@ def TrainAsHam(msgstore_message, manager, rescore = True, save_db = True): import train subject = msgstore_message.subject - print "Training on message '%s' in '%s - " % \ + print("Training on message '%s' in '%s - " % \ (subject, - msgstore_message.GetFolder().GetFQName()), + msgstore_message.GetFolder().GetFQName()), end=' ') if train.train_message(msgstore_message, False, manager.classifier_data): - print "trained as good" + print("trained as good") # Simplest way to rescore is to re-filter with all_actions = False if rescore: import filter filter.filter_message(msgstore_message, manager, all_actions = False) else: - print "already was trained as good" + print("already was trained as good") manager.classifier_data.message_db.load_msg(msgstore_message) assert train.been_trained_as_ham(msgstore_message) if save_db: @@ -154,17 +154,17 @@ def TrainAsSpam(msgstore_message, manager, rescore = True, save_db = True): import train subject = msgstore_message.subject - print "Training on message '%s' in '%s - " % \ + print("Training on message '%s' in '%s - " % \ (subject, - msgstore_message.GetFolder().GetFQName()), + msgstore_message.GetFolder().GetFQName()), end=' ') if train.train_message(msgstore_message, True, manager.classifier_data): - print "trained as spam" + print("trained as spam") # Simplest way to rescore is to re-filter with all_actions = False if rescore: import filter filter.filter_message(msgstore_message, manager, all_actions = False) else: - print "already was trained as spam" + print("already was trained as spam") manager.classifier_data.message_db.load_msg(msgstore_message) assert train.been_trained_as_spam(msgstore_message) # And if the DB can save itself incrementally, do it now @@ -215,14 +215,14 @@ # get the foldername before the move operation! folder_name = msgstore_message.GetFolder().GetFQName() disposition = filter.filter_message(msgstore_message, manager) - print "Message '%s' in '%s' had a Spam classification of '%s'" \ + print("Message '%s' in '%s' had a Spam classification of '%s'" \ % (msgstore_message.GetSubject(), folder_name, - disposition) + disposition)) manager.HandleNotification(disposition) else: - print "Spam filtering is disabled - ignoring new message" + print("Spam filtering is disabled - ignoring new message") except manager.message_store.NotFoundException: manager.LogDebug(1, "ProcessMessage had the message moved out from underneath us") manager.LogDebug(2, "ProcessMessage finished for", msgstore_message.subject) @@ -242,7 +242,7 @@ # Folder event handler classes class _BaseItemsEvent: def Init(self, target, application, manager): - self.owner_thread_ident = thread.get_ident() # check we arent multi-threaded + self.owner_thread_ident = _thread.get_ident() # check we arent multi-threaded self.application = application self.manager = manager self.target = target @@ -261,17 +261,17 @@ interval = self.manager.config.filter.timer_interval use_timer = timer_enabled and start_delay and interval if timer_enabled and not use_timer: - print "*" * 50 - print "The timer is enabled, but one of the timer intervals values is zero" - print "You must set both intervals before the timer will enable" + print("*" * 50) + print("The timer is enabled, but one of the timer intervals values is zero") + print("You must set both intervals before the timer will enable") if use_timer and not hasattr(timer, "__version__"): # No binaries will see this. - print "*" * 50 - print "SORRY: You have tried to enable the timer, but you have a" - print "leaky version of the 'timer' module. These leaks prevent" - print "Outlook from shutting down. Please update win32all to post 154" - print "The timer is NOT enabled..." - print "*" * 50 + print("*" * 50) + print("SORRY: You have tried to enable the timer, but you have a") + print("leaky version of the 'timer' module. These leaks prevent") + print("Outlook from shutting down. Please update win32all to post 154") + print("The timer is NOT enabled...") + print("*" * 50) use_timer = False if use_timer: @@ -284,22 +284,22 @@ # Don't allow insane values for the timer. if use_timer: too = None - if not isinstance(start_delay, types.FloatType) or \ - not isinstance(interval, types.FloatType): - print "*" * 50 - print "Timer values are garbage!", repr(start_delay), repr(interval) + if not isinstance(start_delay, float) or \ + not isinstance(interval, float): + print("*" * 50) + print("Timer values are garbage!", repr(start_delay), repr(interval)) use_timer = False elif start_delay < 0.4 or interval < 0.4: too = "too often" elif start_delay > 60 or interval > 60: too = "too infrequently" if too: - print "*" * 50 - print "The timer is configured to fire way " + too + \ + print("*" * 50) + print("The timer is configured to fire way " + too + \ " (delay=%s seconds, interval=%s seconds)" \ - % (start_delay, interval) - print "Please adjust your configuration. The timer is NOT enabled..." - print "*" * 50 + % (start_delay, interval)) + print("Please adjust your configuration. The timer is NOT enabled...") + print("*" * 50) use_timer = False self.use_timer = use_timer @@ -315,9 +315,9 @@ self._KillTimer() _BaseItemsEvent.Close(self, *args) def _DoStartTimer(self, delay): - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident assert self.timer_id is None, "Shouldn't start a timer when already have one" - assert isinstance(delay, types.FloatType), "Timer values are float seconds" + assert isinstance(delay, float), "Timer values are float seconds" # And start a new timer. assert delay, "No delay means no timer!" delay = int(delay*1000) # convert to ms. @@ -334,7 +334,7 @@ self._DoStartTimer(delay) def _KillTimer(self): - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident if self.timer_id is not None: timer.kill_timer(self.timer_id) self.manager.LogDebug(2, "The timer with id=%d was stopped" % self.timer_id) @@ -342,7 +342,7 @@ def _TimerFunc(self, event, time): # Kill the timer first - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident self.manager.LogDebug(1, "The timer with id=%s fired" % self.timer_id) self._KillTimer() assert self.timer_generator, "Can't have a timer with no generator" @@ -360,7 +360,7 @@ # If the Spam score *is* saved, the generator should only return # ones that HaveSeen() returns False for, so therefore isn't a hit. while 1: - item = self.timer_generator.next() + item = next(self.timer_generator) try: if not HaveSeenMessage(item, self.manager): break @@ -627,7 +627,7 @@ ver_latest = get_version(app_name, version_dict=latest) latest_ver_string = ver_latest.get_long_version(ADDIN_DISPLAY_NAME) except: - print "Error checking the latest version" + print("Error checking the latest version") traceback.print_exc() manager.ReportError( _("There was an error checking for the latest version\r\n" @@ -636,7 +636,7 @@ ) return - print "Current version is %s, latest is %s." % (str(ver_current), str(ver_latest)) + print("Current version is %s, latest is %s." % (str(ver_current), str(ver_latest))) if ver_latest > ver_current: url = get_download_page(app_name, version_dict=latest) msg = _("You are running %s\r\n\r\nThe latest available version is %s" \ @@ -644,7 +644,7 @@ "\r\n\r\nWould you like to visit this page now?") \ % (cur_ver_string, latest_ver_string, url) if manager.AskQuestion(msg): - print "Opening browser page", url + print("Opening browser page", url) os.startfile(url) else: msg = _("The latest available version is %s\r\n\r\n" \ @@ -658,12 +658,12 @@ # the test suite to save shutting down Outlook each time we tweak it. reload(tester) try: - print "Executing automated tests..." + print("Executing automated tests...") tester.test(manager) except: traceback.print_exc() - print "Tests FAILED. Sorry about that. If I were you, I would do a full re-train ASAP" - print "Please delete any test messages from your Spam, Unsure or Inbox/Watch folders first." + print("Tests FAILED. Sorry about that. If I were you, I would do a full re-train ASAP") + print("Please delete any test messages from your Spam, Unsure or Inbox/Watch folders first.") # The "Spam" and "Not Spam" buttons # The event from Outlook's explorer that our folder has changed. @@ -717,7 +717,7 @@ msgstore_message.Save() # Must train before moving, else we lose the message! subject = msgstore_message.GetSubject() - print "Moving and spam training message '%s' - " % (subject,), + print("Moving and spam training message '%s' - " % (subject,), end=' ') TrainAsSpam(msgstore_message, self.manager, save_db = False) # Do the new message state if necessary. try: @@ -727,9 +727,9 @@ msgstore_message.SetReadState(False) else: if new_msg_state not in ["", "None", None]: - print "*** Bad new_msg_state value: %r" % (new_msg_state,) + print("*** Bad new_msg_state value: %r" % (new_msg_state,)) except pythoncom.com_error: - print "*** Failed to set the message state to '%s' for message '%s'" % (new_msg_state, subject) + print("*** Failed to set the message state to '%s' for message '%s'" % (new_msg_state, subject)) # Now move it. msgstore_message.MoveToReportingError(self.manager, spam_folder) # Note the move will possibly also trigger a re-train @@ -774,14 +774,14 @@ restore_folder = msgstore_message.GetRememberedFolder() if restore_folder is None or \ msgstore_message.GetFolder() == restore_folder: - print "Unable to determine source folder for message '%s' - restoring to Inbox" % (subject,) + print("Unable to determine source folder for message '%s' - restoring to Inbox" % (subject,)) restore_folder = inbox_folder # Record this recovery in our stats. self.manager.stats.RecordTraining(True, self.manager.score(msgstore_message)) # Must train before moving, else we lose the message! - print "Recovering to folder '%s' and ham training message '%s' - " % (restore_folder.name, subject), + print("Recovering to folder '%s' and ham training message '%s' - " % (restore_folder.name, subject), end=' ') TrainAsHam(msgstore_message, self.manager, save_db = False) # Do the new message state if necessary. try: @@ -791,10 +791,10 @@ msgstore_message.SetReadState(False) else: if new_msg_state not in ["", "None", None]: - print "*** Bad new_msg_state value: %r" % (new_msg_state,) - except msgstore.MsgStoreException, details: - print "*** Failed to set the message state to '%s' for message '%s'" % (new_msg_state, subject) - print details + print("*** Bad new_msg_state value: %r" % (new_msg_state,)) + except msgstore.MsgStoreException as details: + print("*** Failed to set the message state to '%s' for message '%s'" % (new_msg_state, subject)) + print(details) # Now move it. msgstore_message.MoveToReportingError(self.manager, restore_folder) except msgstore.NotFoundException: @@ -819,7 +819,7 @@ elif fname=="delete_as_spam.bmp": bid = 6001 else: - raise RuntimeError, "What bitmap to use for '%s'?" % fname + raise RuntimeError("What bitmap to use for '%s'?" % fname) handle = win32gui.LoadImage(sys.frozendllhandle, bid, win32con.IMAGE_BITMAP, 0, 0, win32con.LR_DEFAULTSIZE) else: if not os.path.isabs(fname): @@ -827,7 +827,7 @@ fname = os.path.join(manager.application_directory, "images", fname) if not os.path.isfile(fname): - print "WARNING - Trying to use image '%s', but it doesn't exist" % (fname,) + print("WARNING - Trying to use image '%s', but it doesn't exist" % (fname,)) return None handle = win32gui.LoadImage(0, fname, win32con.IMAGE_BITMAP, 0, 0, win32con.LR_DEFAULTSIZE | win32con.LR_LOADFROMFILE) win32clipboard.OpenClipboard() @@ -918,13 +918,13 @@ Type = constants.msoControlPopup, Tag = "SpamBayesCommand.Popup") if item is None: - print "ERROR: Could't re-find control to delete" + print("ERROR: Could't re-find control to delete") break item.Delete(False) - print "The above toolbar message is common - " \ - "recreating the toolbar..." - except pythoncom.com_error, e: - print "ERROR: Failed to delete our dead toolbar control" + print("The above toolbar message is common - " \ + "recreating the toolbar...") + except pythoncom.com_error as e: + print("ERROR: Failed to delete our dead toolbar control") break # ok - toolbar deleted - just run around the loop again continue @@ -1027,7 +1027,7 @@ # elsewhere). If we can not find the child control, we then try and # locate our toolbar, creating if necessary. Our items get added to # that. - assert item_attrs.has_key('Tag'), "Need a 'Tag' attribute!" + assert 'Tag' in item_attrs, "Need a 'Tag' attribute!" image_fname = None if 'image' in item_attrs: image_fname = item_attrs['image'] @@ -1067,7 +1067,7 @@ else: # for not broken - can't find toolbar. Create a new one. # Create it as a permanent one (which is default) - print "Creating new SpamBayes toolbar to host our buttons" + print("Creating new SpamBayes toolbar to host our buttons") self.toolbar = bars.Add(toolbar_name, constants.msoBarTop, Temporary=False) @@ -1076,10 +1076,10 @@ # Now add the item itself to the parent. try: item = parent.Controls.Add(Type=control_type, Temporary=temporary) - except pythoncom.com_error, e: + except pythoncom.com_error as e: # Toolbars seem to still fail randomly for some users. # eg, bug [ 755738 ] Latest CVS outllok doesn't work - print "FAILED to add the toolbar item '%s' - %s" % (tag,e) + print("FAILED to add the toolbar item '%s' - %s" % (tag,e)) return if image_fname: # Eeek - only available in derived class. @@ -1087,7 +1087,7 @@ but = CastTo(item, "_CommandBarButton") SetButtonImage(but, image_fname, self.manager) # Set the extra attributes passed in. - for attr, val in item_attrs.items(): + for attr, val in list(item_attrs.items()): setattr(item, attr, val) # didn't previously set this, and it seems to fix alot of problem - so # we set it for every object, even existing ones. @@ -1122,10 +1122,10 @@ ret.append(msgstore_message) except ms.NotFoundException: pass - except ms.MsgStoreException, details: - print "Unexpected error fetching message" + except ms.MsgStoreException as details: + print("Unexpected error fetching message") traceback.print_exc() - print details + print(details) if len(ret) == 0: self.manager.ReportError(_("No filterable mail items are selected"), @@ -1197,7 +1197,7 @@ show_recover_as = True show_delete_as = True except: - print "Error finding the MAPI folders for a folder switch event" + print("Error finding the MAPI folders for a folder switch event") # As this happens once per move, we should only display it once. self.manager.ReportErrorOnce(_( "There appears to be a problem with the SpamBayes" @@ -1243,7 +1243,7 @@ if len(self.explorers)==0: # No more explorers - disconnect all events. # (not doing this causes shutdown problems) - for tag, button in self.button_event_map.items(): + for tag, button in list(self.button_event_map.items()): closer = getattr(button, "Close", None) if closer is not None: closer() @@ -1295,13 +1295,13 @@ v = get_current_version() vstring = v.get_long_version(ADDIN_DISPLAY_NAME) if not hasattr(sys, "frozen"): vstring += " from source" - print vstring + print(vstring) major, minor, spack, platform, ver_str = win32api.GetVersionEx() - print "on Windows %d.%d.%d (%s)" % \ - (major, minor, spack, ver_str) - print "using Python", sys.version + print("on Windows %d.%d.%d (%s)" % \ + (major, minor, spack, ver_str)) + print("using Python", sys.version) from time import asctime, localtime - print "Log created", asctime(localtime()) + print("Log created", asctime(localtime())) self.explorers_events = None # create at OnStartupComplete @@ -1311,7 +1311,7 @@ # bootstrap code that can't happen until startup is complete. self.OnStartupComplete(None) except: - print "Error connecting to Outlook!" + print("Error connecting to Outlook!") traceback.print_exc() # We can't translate this string, as we haven't managed to load # the translation tools. @@ -1346,7 +1346,7 @@ try: self.ProcessMissedMessages() except: - print "Error processing missed messages!" + print("Error processing missed messages!") traceback.print_exc() else: # We should include this fact in the log, as I suspect a @@ -1385,8 +1385,8 @@ "Skipping processing of missed messages in folder '%s', " "as it is not available" % folder.name) elif event_hook.use_timer: - print "Processing missed spam in folder '%s' by starting a timer" \ - % (folder.name,) + print("Processing missed spam in folder '%s' by starting a timer" \ + % (folder.name,)) event_hook._StartTimer() else: num = 0 @@ -1395,8 +1395,8 @@ ProcessMessage(message, manager) num += 1 # See if perf hurts anyone too much. - print "Processing %d missed spam in folder '%s' took %gms" \ - % (num, folder.name, (clock()-start)*1000) + print("Processing %d missed spam in folder '%s' took %gms" \ + % (num, folder.name, (clock()-start)*1000)) def FiltersChanged(self): try: @@ -1415,7 +1415,7 @@ except: # If this fails, just log an error - don't bother with # the traceback - print "Error adding field to 'Unsure' folder %r" % (unsure_id,) + print("Error adding field to 'Unsure' folder %r" % (unsure_id,)) etype, value, tb = sys.exc_info() tb = None # dont want it, and nuke circular ref traceback.print_exception(etype, value, tb) @@ -1438,8 +1438,8 @@ SpamFolderItemsEvent, "incremental training") ) - for k in self.folder_hooks.keys(): - if not new_hooks.has_key(k): + for k in list(self.folder_hooks.keys()): + if k not in new_hooks: self.folder_hooks[k].Close() self.folder_hooks = new_hooks @@ -1459,7 +1459,7 @@ name = msgstore_folder.GetFQName() try: folder = msgstore_folder.GetOutlookItem() - except self.manager.message_store.MsgStoreException, details: + except self.manager.message_store.MsgStoreException as details: # Exceptions here are most likely when the folder is valid # and available to MAPI, but not via the Outlook. # One good way to provoke this is to configure Outlook's @@ -1467,9 +1467,9 @@ # when you start Outlook, it immediately displays an # error and terminates. During this process, the addin # is initialized, attempts to get the folders, and fails. - print "FAILED to open the Outlook folder '%s' " \ - "to hook events" % name - print details + print("FAILED to open the Outlook folder '%s' " \ + "to hook events" % name) + print(details) continue # Ensure the field is created before we hook the folder # events, else there is a chance our event handler will @@ -1481,8 +1481,8 @@ # 'spam' field is not fatal, nor really even worth # telling the user about, nor even worth a traceback # (as it is likely a COM error). - print "ERROR: Failed to check folder '%s' for " \ - "Spam field" % name + print("ERROR: Failed to check folder '%s' for " \ + "Spam field" % name) etype, value, tb = sys.exc_info() tb = None # dont want it, and nuke circular ref traceback.print_exception(etype, value, tb) @@ -1490,21 +1490,21 @@ try: new_hook = DispatchWithEvents(folder.Items, HandlerClass) except ValueError: - print "WARNING: Folder '%s' can not hook events" % (name,) + print("WARNING: Folder '%s' can not hook events" % (name,)) new_hook = None if new_hook is not None: new_hook.Init(msgstore_folder, self.application, self.manager) new_hooks[msgstore_folder.id] = new_hook - print "SpamBayes: Watching (for %s) in '%s'" % (what, name) + print("SpamBayes: Watching (for %s) in '%s'" % (what, name)) else: new_hooks[msgstore_folder.id] = existing existing.ReInit() return new_hooks def OnDisconnection(self, mode, custom): - print "SpamBayes - Disconnecting from Outlook" + print("SpamBayes - Disconnecting from Outlook") if self.folder_hooks: - for hook in self.folder_hooks.values(): + for hook in list(self.folder_hooks.values()): hook.Close() self.folder_hooks = None if self.explorers_events is not None: @@ -1517,10 +1517,10 @@ # it (ie, the dialog) self.manager.Save() # Report some simple stats, for session, and for total. - print "Session:" - print "\r\n".join(self.manager.stats.GetStats(session_only=True)) - print "Total:" - print "\r\n".join(self.manager.stats.GetStats()) + print("Session:") + print("\r\n".join(self.manager.stats.GetStats(session_only=True))) + print("Total:") + print("\r\n".join(self.manager.stats.GetStats())) self.manager.Close() self.manager = None @@ -1528,7 +1528,7 @@ # The user has de-selected us. Remove the toolbars we created # (Maybe we can exploit this later to remove toolbars as part # of uninstall?) - print "SpamBayes is being manually disabled - deleting toolbar" + print("SpamBayes is being manually disabled - deleting toolbar") try: explorers = self.application.Explorers for i in range(explorers.Count): @@ -1536,22 +1536,22 @@ try: toolbar = explorer.CommandBars.Item(toolbar_name) except pythoncom.com_error: - print "Could not find our toolbar to delete!" + print("Could not find our toolbar to delete!") else: toolbar.Delete() except: - print "ERROR deleting toolbar" + print("ERROR deleting toolbar") traceback.print_exc() self.application = None - print "Addin terminating: %d COM client and %d COM servers exist." \ - % (pythoncom._GetInterfaceCount(), pythoncom._GetGatewayCount()) + print("Addin terminating: %d COM client and %d COM servers exist." \ + % (pythoncom._GetInterfaceCount(), pythoncom._GetGatewayCount())) try: # will be available if "python_d addin.py" is used to # register the addin. total_refs = sys.gettotalrefcount() # debug Python builds only - print "%d Python references exist" % (total_refs,) + print("%d Python references exist" % (total_refs,)) except AttributeError: pass @@ -1562,13 +1562,13 @@ pass def _DoRegister(klass, root): - key = _winreg.CreateKey(root, + key = winreg.CreateKey(root, "Software\\Microsoft\\Office\\Outlook\\Addins") - subkey = _winreg.CreateKey(key, klass._reg_progid_) - _winreg.SetValueEx(subkey, "CommandLineSafe", 0, _winreg.REG_DWORD, 0) - _winreg.SetValueEx(subkey, "LoadBehavior", 0, _winreg.REG_DWORD, 3) - _winreg.SetValueEx(subkey, "Description", 0, _winreg.REG_SZ, "SpamBayes anti-spam tool") - _winreg.SetValueEx(subkey, "FriendlyName", 0, _winreg.REG_SZ, "SpamBayes") + subkey = winreg.CreateKey(key, klass._reg_progid_) + winreg.SetValueEx(subkey, "CommandLineSafe", 0, winreg.REG_DWORD, 0) + winreg.SetValueEx(subkey, "LoadBehavior", 0, winreg.REG_DWORD, 3) + winreg.SetValueEx(subkey, "Description", 0, winreg.REG_SZ, "SpamBayes anti-spam tool") + winreg.SetValueEx(subkey, "FriendlyName", 0, winreg.REG_SZ, "SpamBayes") # Note that Addins can be registered either in HKEY_CURRENT_USER or # HKEY_LOCAL_MACHINE. If the former, then: @@ -1594,8 +1594,8 @@ DllUnregisterServer() # Don't catch exceptions here - if it fails, the Dll registration # must fail. - _DoRegister(klass, _winreg.HKEY_LOCAL_MACHINE) - print "Registration (in HKEY_LOCAL_MACHINE) complete." + _DoRegister(klass, winreg.HKEY_LOCAL_MACHINE) + print("Registration (in HKEY_LOCAL_MACHINE) complete.") def DllRegisterServer(): klass = OutlookAddin @@ -1604,26 +1604,26 @@ # remove the HKLM registration here (but it can be re-added - see the # notes above.) try: - _winreg.DeleteKey(_winreg.HKEY_LOCAL_MACHINE, + winreg.DeleteKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Office\\Outlook\\Addins\\" \ + klass._reg_progid_) except WindowsError: pass - _DoRegister(klass, _winreg.HKEY_CURRENT_USER) - print "Registration complete." + _DoRegister(klass, winreg.HKEY_CURRENT_USER) + print("Registration complete.") def DllUnregisterServer(): klass = OutlookAddin # Try to remove the HKLM version. try: - _winreg.DeleteKey(_winreg.HKEY_LOCAL_MACHINE, + winreg.DeleteKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Office\\Outlook\\Addins\\" \ + klass._reg_progid_) except WindowsError: pass # and again for current user. try: - _winreg.DeleteKey(_winreg.HKEY_CURRENT_USER, + winreg.DeleteKey(winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\Addins\\" \ + klass._reg_progid_) except WindowsError: Modified: branches/python3/spambayes/Outlook2000/config.py =================================================================== --- branches/python3/spambayes/Outlook2000/config.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/config.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -37,18 +37,18 @@ if not is_multi and not value: return None # Now sure why we get non-strings here for multis - if type(value) == types.ListType: + if type(value) == list: return value # If we really care here, it would be fairly easy to use a regex # etc to pull these IDs apart. eval is easier for now :) try: items = eval(value) except: - error = "Invalid value (%s:%s)" % (sys.exc_type, sys.exc_value) + error = "Invalid value (%s:%s)" % (sys.exc_info()[0], sys.exc_info()[1]) check_items = [] if error is None: if is_multi: - if type(items) != types.ListType: + if type(items) != list: error = "Multi-valued ID must yield a list" check_items = items else: @@ -62,9 +62,9 @@ error = "Each ID must be a tuple of 2 strings" break if error is not None: - print "Failed to convert FolderID value '%r', is_multi=%d" % \ - (value, is_multi) - print error + print("Failed to convert FolderID value '%r', is_multi=%d" % \ + (value, is_multi)) + print(error) if is_multi: return [] else: @@ -78,13 +78,13 @@ return str(self.value) def multiple_values_allowed(self): - return type(self.value)==types.ListType + return type(self.value)==list def is_valid_single(self, value): return value is None or \ - (type(value)==types.TupleType and \ + (type(value)==tuple and \ len(value)==2 and \ - type(value[0])==type(value[1])==types.StringType) + type(value[0])==type(value[1])==bytes) defaults = { "General" : ( @@ -337,9 +337,9 @@ container = SectionContainer(self._options, key) self.__dict__[attr] = container return container - raise AttributeError, "Options has no section '%s'" % attr + raise AttributeError("Options has no section '%s'" % attr) def __setattr__(self, attr, val): - raise AttributeError, "No section [%s]" % attr + raise AttributeError("No section [%s]" % attr) # and delegate a few methods so this object can be used in place of # a real options object. maybe should add this to getattr. do we want all? def get_option(self, section, name): @@ -365,11 +365,11 @@ def _dump(self, thisname="", level=0): import pprint prefix = " " * level - print "%s%s:" % (prefix, thisname) - for name, ob in self.__dict__.items(): + print("%s%s:" % (prefix, thisname)) + for name, ob in list(self.__dict__.items()): d = getattr(ob, "_dump", None) if d is None: - print "%s %s: %s" % (prefix, name, pprint.pformat(ob)) + print("%s %s: %s" % (prefix, name, pprint.pformat(ob))) else: d(name, level+1) @@ -383,56 +383,56 @@ options.merge_files(['delme.cfg']) c = OptionsContainer(options) f = options.get("Training", "ham_folder_ids") - print "Folders before set are", f + print("Folders before set are", f) for i in f: - print i, type(i) + print(i, type(i)) new_folder_ids = [('000123','456789'), ('ABCDEF', 'FEDCBA')] options.set("Training", "ham_folder_ids", new_folder_ids) f = options.get("Training", "ham_folder_ids") - print "Folders after set are", f + print("Folders after set are", f) for i in f: - print i, type(i) + print(i, type(i)) try: c.filter.oops = "Foo" except (AttributeError,KeyError): # whatever :) pass else: - print "ERROR: I was able to set an invalid sub-property!" + print("ERROR: I was able to set an invalid sub-property!") try: c.oops = "Foo" except (AttributeError,KeyError): # whatever :) pass else: - print "ERROR: I was able to set an invalid top-level property!" + print("ERROR: I was able to set an invalid top-level property!") # Test single ID folders. if c.filter.unsure_folder_id is not None: - print "It appears we loaded a folder ID - resetting" + print("It appears we loaded a folder ID - resetting") c.filter.unsure_folder_id = None unsure_id = c.filter.unsure_folder_id - if unsure_id is not None: raise ValueError, "unsure_id wrong (%r)" % (c.filter.unsure_folder_id,) + if unsure_id is not None: raise ValueError("unsure_id wrong (%r)" % (c.filter.unsure_folder_id,)) unsure_id = c.filter.unsure_folder_id = ('12345', 'abcdef') - if unsure_id != c.filter.unsure_folder_id: raise ValueError, "unsure_id wrong (%r)" % (c.filter.unsure_folder_id,) + if unsure_id != c.filter.unsure_folder_id: raise ValueError("unsure_id wrong (%r)" % (c.filter.unsure_folder_id,)) c.filter.unsure_folder_id = None - if c.filter.unsure_folder_id is not None: raise ValueError, "unsure_id wrong (%r)" % (c.filter.unsure_folder_id,) + if c.filter.unsure_folder_id is not None: raise ValueError("unsure_id wrong (%r)" % (c.filter.unsure_folder_id,)) options.set("Filter", "filter_now", True) - print "Filter_now from container is", c.filter.filter_now + print("Filter_now from container is", c.filter.filter_now) options.set("Filter", "filter_now", False) - print "Filter_now from container is now", c.filter.filter_now + print("Filter_now from container is now", c.filter.filter_now) c.filter.filter_now = True - print "Filter_now from container is finally", c.filter.filter_now - print "Only unread is", c.filter_now.only_unread + print("Filter_now from container is finally", c.filter.filter_now) + print("Only unread is", c.filter_now.only_unread) v = r"/foo/bar" c.general.data_directory=v - if c.general.data_directory!=v: print "Bad directory!", c.general.data_directory + if c.general.data_directory!=v: print("Bad directory!", c.general.data_directory) v = r"c:\test directory\some sub directory" c.general.data_directory=v - if c.general.data_directory!=v: print "Bad directory!", c.general.data_directory + if c.general.data_directory!=v: print("Bad directory!", c.general.data_directory) v = r"\\server\c$" c.general.data_directory=v - if c.general.data_directory!=v: print "Bad directory!", c.general.data_directory + if c.general.data_directory!=v: print("Bad directory!", c.general.data_directory) options.update_file("delme.cfg") - print "Created 'delme.cfg'" + print("Created 'delme.cfg'") Modified: branches/python3/spambayes/Outlook2000/config_wizard.py =================================================================== --- branches/python3/spambayes/Outlook2000/config_wizard.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/config_wizard.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -139,7 +139,7 @@ try: os.remove(fname) except OSError: - print "Warning: unable to remove", fname + print("Warning: unable to remove", fname) def CreateWizardConfig(manager, from_existing): import config Modified: branches/python3/spambayes/Outlook2000/dialogs/FolderSelector.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/FolderSelector.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/FolderSelector.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -1,5 +1,5 @@ -from __future__ import generators + import sys, os import win32con import commctrl @@ -9,7 +9,7 @@ import struct, array -import dlgutils +from . import dlgutils from pprint import pprint # debugging only verbose = 0 @@ -29,7 +29,7 @@ def dump(self, level=0): prefix = " " * level - print prefix + self.name + print(prefix + self.name) for c in self.children: c.dump(level+1) @@ -69,7 +69,7 @@ PR_STORE_ENTRYID, PR_DISPLAY_NAME_A), None, order, 0) if verbose: - print "Rows for sub-folder of", folder_spec.name, "-", folder_spec.folder_id + print("Rows for sub-folder of", folder_spec.name, "-", folder_spec.folder_id) pprint(rows) for (eid_tag, eid),(storeeid_tag, store_eid), (name_tag, name) in rows: # Note the eid we get here is short-term - hence we must @@ -97,11 +97,11 @@ else: spec.children = None # Flag as "not yet built" children.append(spec) - except (pythoncom.com_error, manager.message_store.MsgStoreException), details: + except (pythoncom.com_error, manager.message_store.MsgStoreException) as details: # Users have reported failure here - it is not clear if the # entire tree is going to fail, or just this folder - print "** Unable to open child folder - ignoring" - print details + print("** Unable to open child folder - ignoring") + print(details) dlgutils.SetWaitCursor(0) return children @@ -111,7 +111,7 @@ prop_tags = PR_ENTRYID, PR_DISPLAY_NAME_A rows = mapi.HrQueryAllRows(tab, prop_tags, None, None, 0) if verbose: - print "message store rows:" + print("message store rows:") pprint(rows) for row in rows: (eid_tag, eid), (name_tag, name) = row @@ -122,24 +122,24 @@ hr, data = msgstore.GetProps((PR_IPM_SUBTREE_ENTRYID,)+ignore_ids, 0) # It appears that not all stores have a subtree. if PROP_TYPE(data[0][0]) != PT_BINARY: - print "FolderSelector dialog found message store without a subtree - ignoring" + print("FolderSelector dialog found message store without a subtree - ignoring") continue subtree_eid = data[0][1] ignore_eids = [item[1] for item in data[1:] if PROP_TYPE(item[0])==PT_BINARY] - except pythoncom.com_error, details: + except pythoncom.com_error as details: # Handle 'expected' errors. if details[0]== mapi.MAPI_E_FAILONEPROVIDER: - print "A message store is temporarily unavailable - " \ - "it will not appear in the Folder Selector dialog" + print("A message store is temporarily unavailable - " \ + "it will not appear in the Folder Selector dialog") else: # Some weird error opening a folder tree # Just print a warning and ignore the tree. - print "Failed to open a message store for the FolderSelector dialog" - print "Exception details:", details + print("Failed to open a message store for the FolderSelector dialog") + print("Exception details:", details) continue folder_id = hex_eid, mapi.HexFromBin(subtree_eid) if verbose: - print "message store root folder id is", folder_id + print("message store root folder id is", folder_id) spec = FolderSpec(folder_id, name, ignore_eids) spec.children = None @@ -254,7 +254,7 @@ ######################################################################### ## The dialog itself ######################################################################### -import dlgcore +from . import dlgcore FolderSelector_Parent = dlgcore.TooltipDialog class FolderSelector(FolderSelector_Parent): @@ -338,11 +338,11 @@ cItems, item_id)) if verbose: - print "Inserting item", repr(insert_buf), "-", + print("Inserting item", repr(insert_buf), "-", end=' ') hitem = win32gui.SendMessage(self.list, commctrl.TVM_INSERTITEM, 0, insert_buf) if verbose: - print "got back handle", hitem + print("got back handle", hitem) return hitem def _InsertSubFolders(self, hParent, folderSpec): @@ -368,14 +368,14 @@ for folder_id in self.selected_ids: try: folder = self.manager.message_store.GetFolder(folder_id) - except self.manager.message_store.MsgStoreException, details: - print "Can't find a folder to expand:", details + except self.manager.message_store.MsgStoreException as details: + print("Can't find a folder to expand:", details) folder = None while folder is not None: try: parent = folder.GetParent() - except self.manager.message_store.MsgStoreException, details: - print "Can't find folder's parent:", details + except self.manager.message_store.MsgStoreException as details: + print("Can't find folder's parent:", details) parent = None if parent is not None and \ not self.InIDs(parent.GetID(), folders_to_expand): @@ -503,7 +503,7 @@ # empty-display-name parent, which should not be # the case. grandparent = parent.GetParent() - except self.manager.message_store.MsgStoreException, details: + except self.manager.message_store.MsgStoreException as details: hr, msg, exc, argErr = details.mapi_exception if hr == winerror.E_ACCESSDENIED: valid = parent is not None @@ -511,9 +511,9 @@ raise # but only down a couple of lines... else: valid = parent is not None and grandparent is not None - except self.manager.message_store.MsgStoreException, details: - print "Eeek - couldn't get the folder to check " \ - "valid:", details + except self.manager.message_store.MsgStoreException as details: + print("Eeek - couldn't get the folder to check " \ + "valid:", details) valid = False if not valid: if result_valid: # are we the first invalid? @@ -542,7 +542,7 @@ else: win32gui.SendMessage(child, win32con.BM_SETCHECK, self.checkbox_state) self.list = self.GetDlgItem("IDC_LIST_FOLDERS") - import resources + from . import resources mod_handle, mod_bmp, extra_flags = \ resources.GetImageParamsFromBitmapID(self.dialog_parser, "IDB_FOLDERS") bitmapMask = win32api.RGB(0,0,255) @@ -732,7 +732,7 @@ # And update the tree with the new item buf, extra = PackTVITEM(handle, None, None, name, None, None, None, None) win32gui.SendMessage(self.list, commctrl.TVM_SETITEM, 0, buf) - except pythoncom.com_error, details: + except pythoncom.com_error as details: hr, msg, exc, arg = details if hr == mapi.MAPI_E_COLLISION: user_msg = "A folder with that name already exists" @@ -763,7 +763,7 @@ ids = [("0000","0000"),] # invalid ID for testing. d=FolderSelector(0, mgr, ids, single_select = single_select) if d.DoModal() != win32con.IDOK: - print "Cancelled" + print("Cancelled") return ids, include_sub = d.GetSelectedIDs() d=FolderSelector(0, mgr, ids, single_select = single_select, checkbox_state = include_sub) Modified: branches/python3/spambayes/Outlook2000/dialogs/__init__.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/__init__.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/__init__.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -19,7 +19,7 @@ # If we are running from binaries, the rc name is not used at all - we # assume someone running from source previously generated the .py! if not hasattr(sys, "frozen") and not mod: - from resources import rc2py + from .resources import rc2py rc_path = os.path.dirname( rc2py.__file__ ) if not os.path.isabs(rc_name): rc_name = os.path.join( rc_path, rc_name) @@ -41,7 +41,7 @@ rc_mtime = rc_size = None if rc_mtime!=mtime or rc_size!=size: # Need to generate the dialog. - print "Generating %s from %s" % (py_name, rc_name) + print("Generating %s from %s" % (py_name, rc_name)) rc2py.convert(rc_name, py_name) if mod is not None: reload(mod) @@ -54,7 +54,7 @@ """Displays another dialog""" if manager.dialog_parser is None: manager.dialog_parser = LoadDialogs() - import dialog_map + from . import dialog_map commands = dialog_map.dialog_map[idd] if not parent: import win32gui @@ -63,7 +63,7 @@ except win32gui.error: pass - import dlgcore + from . import dlgcore dlg = dlgcore.ProcessorDialog(parent, manager, config, idd, commands) return dlg.DoModal() @@ -71,24 +71,24 @@ import config_wizard, win32con config = config_wizard.CreateWizardConfig(manager, use_existing_config) if ShowDialog(parent, manager, config, idd) == win32con.IDOK: - print "Saving wizard changes" + print("Saving wizard changes") config_wizard.CommitWizardConfig(manager, config) else: - print "Cancelling wizard" + print("Cancelling wizard") config_wizard.CancelWizardConfig(manager, config) def MakePropertyPage(parent, manager, config, idd, yoffset=24): """Creates a child dialog box to use as property page in a tab control""" if manager.dialog_parser is None: manager.dialog_parser = LoadDialogs() - import dialog_map + from . import dialog_map commands = dialog_map.dialog_map[idd] if not parent: raise ValueError("Parent must be the tab control") - import dlgcore + from . import dlgcore dlg = dlgcore.ProcessorPage(parent, manager, config, idd, commands, yoffset) return dlg -import dlgutils +from . import dlgutils SetWaitCursor = dlgutils.SetWaitCursor Modified: branches/python3/spambayes/Outlook2000/dialogs/async_processor.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/async_processor.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/async_processor.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -1,10 +1,10 @@ # An async command processor -from dlgutils import * +from .dlgutils import * import win32gui, win32api, win32con, commctrl import win32process import time -import processors +from . import processors verbose = 0 @@ -74,7 +74,7 @@ # user knows the process has actually started.) control_tick = max(1,int(total_prop * self.total_control_ticks)) if verbose: - print "Tick", self.current_stage_tick, "is", this_prop, "through the stage,", total_prop, "through the total - ctrl tick is", control_tick + print("Tick", self.current_stage_tick, "is", this_prop, "through the stage,", total_prop, "through the total - ctrl tick is", control_tick) win32api.PostMessage(self.hprogress, commctrl.PBM_SETPOS, control_tick) def _get_stage_text(self, text): @@ -130,7 +130,7 @@ while self.running: win32gui.PumpWaitingMessages(0,-1) if i % 100 == 0: - print "Still waiting for async process to finish..." + print("Still waiting for async process to finish...") time.sleep(0.01) i += 1 return True @@ -152,7 +152,7 @@ elif msg == MYWM_FINISHED: self.OnFinished(wparam, lparam) else: - raise RuntimeError, "Not one of my messages??" + raise RuntimeError("Not one of my messages??") def OnFinished(self, wparam, lparam): self.seen_finished = True @@ -244,13 +244,13 @@ self.current_stage = 0 self.set_stages( (("", 1.0),) ) - print "Single stage test" + print("Single stage test") p = HackProgress() p.set_max_ticks(10) for i in range(10): p.tick() - print "First stage test" + print("First stage test") p = HackProgress() stages = ("Stage 1", 0.2), ("Stage 2", 0.8) p.set_stages(stages) @@ -262,7 +262,7 @@ p.set_max_ticks(20) for i in range(20): p.tick() - print "Second stage test" + print("Second stage test") p = HackProgress() stages = ("Stage 1", 0.9), ("Stage 2", 0.1) p.set_stages(stages) @@ -272,7 +272,7 @@ p.set_max_ticks(2) for i in range(2): p.tick() - print "Third stage test" + print("Third stage test") p = HackProgress() stages = ("Stage 1", 0.9), ("Stage 2", 0.1) p.set_stages(stages) @@ -283,4 +283,4 @@ for i in range(2): p.tick() - print "Done!" + print("Done!") Modified: branches/python3/spambayes/Outlook2000/dialogs/dialog_map.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/dialog_map.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/dialog_map.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -2,9 +2,9 @@ # The Python Software Foundation and is covered by the Python Software # Foundation license. -from processors import * -from opt_processors import * -import wizard_processors as wiz +from .processors import * +from .opt_processors import * +from . import wizard_processors as wiz from dialogs import ShowDialog, MakePropertyPage, ShowWizard @@ -119,7 +119,7 @@ str_val = buf[:nchars] val = int(str_val) if val < 0 or val > 10: - raise ValueError, "Value must be between 0 and 10" + raise ValueError("Value must be between 0 and 10") self.SetOptionValue(val) def OnCommand(self, wparam, lparam): code = win32api.HIWORD(wparam) @@ -145,7 +145,7 @@ reason = self.window.manager.GetDisabledReason() if reason is not None: win32gui.SendMessage(self.GetControl(), win32con.BM_SETCHECK, 0) - raise ValueError, reason + raise ValueError(reason) check = not not check # force bool! self.SetOptionValue(check) @@ -376,7 +376,7 @@ ShowWizard(parent, manager, self.idd, use_existing_config = True) def WizardFinish(mgr, window): - print _("Wizard Done!") + print(_("Wizard Done!")) def WizardTrainer(mgr, config, progress): import os, manager, train @@ -429,7 +429,7 @@ mgr.wizard_classifier_data = classifier_data mgr.classifier_data = orig_classifier_data -from async_processor import AsyncCommandProcessor +from .async_processor import AsyncCommandProcessor import filter, train dialog_map = { Modified: branches/python3/spambayes/Outlook2000/dialogs/dlgcore.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/dlgcore.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/dlgcore.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -9,7 +9,7 @@ import commctrl import struct, array -from dlgutils import * +from .dlgutils import * # Isolate the nasty stuff for tooltips somewhere. class TooltipManager: @@ -203,9 +203,9 @@ def GetMessageMap(self): ret = TooltipDialog.GetMessageMap(self) - for key in self.processor_message_map.keys(): + for key in list(self.processor_message_map.keys()): if key in ret: - print "*** WARNING: Overwriting message!!!" + print("*** WARNING: Overwriting message!!!") ret[key] = self.OnCommandProcessorMessage return ret @@ -216,8 +216,8 @@ try: self.GetDlgItem(int_id) except win32gui.error: - print "ERROR: Dialog item %s refers to an invalid control" % \ - self._GetIDName(int_id) + print("ERROR: Dialog item %s refers to an invalid control" % \ + self._GetIDName(int_id)) self.LoadAllControls() def GetPopupHelpText(self, iCtrlId): @@ -226,10 +226,10 @@ if cp is not None: return cp.GetPopupHelpText(iCtrlId) - print "Can not get command processor for", self._GetIDName(iCtrlId) + print("Can not get command processor for", self._GetIDName(iCtrlId)) return None def OnRButtonUp(self, hwnd, msg, wparam, lparam): - for cp in self.command_processors.values(): + for cp in list(self.command_processors.values()): cp.OnRButtonUp(wparam,lparam) def OnCommandProcessorMessage(self, hwnd, msg, wparam, lparam): @@ -260,7 +260,7 @@ def ApplyHandlingOptionValueError(self, func, *args): try: return func(*args) - except ValueError, why: + except ValueError as why: mb_flags = win32con.MB_ICONEXCLAMATION | win32con.MB_OK win32gui.MessageBox(self.hwnd, str(why), "SpamBayes", mb_flags) return False @@ -290,7 +290,7 @@ # delegate rest to our commands. handler = self.command_processors.get(idFrom) if handler is None: - print "Ignoring OnNotify for", self._GetIDName(idFrom) + print("Ignoring OnNotify for", self._GetIDName(idFrom)) return return handler.OnNotify( (hwndFrom, idFrom, code), wparam, lparam) @@ -299,12 +299,12 @@ id = win32api.LOWORD(wparam) # Sometimes called after OnDestroy??? if self.command_processors is None: - print "Ignoring OnCommand for", self._GetIDName(id) + print("Ignoring OnCommand for", self._GetIDName(id)) return else: handler = self.command_processors.get(id) if handler is None: - print "Ignoring OnCommand for", self._GetIDName(id) + print("Ignoring OnCommand for", self._GetIDName(id)) return self.ApplyHandlingOptionValueError(handler.OnCommand, wparam, lparam) Modified: branches/python3/spambayes/Outlook2000/dialogs/opt_processors.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/opt_processors.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/opt_processors.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -9,9 +9,9 @@ import win32gui, win32api, win32con import commctrl import struct, array -from dlgutils import * +from .dlgutils import * -import processors +from . import processors verbose = 0 # set to 1 to see option values fetched and set. @@ -48,8 +48,8 @@ if option is None: option = self.option if verbose: - print "Setting option '%s' (%s) -> %s" % \ - (option.display_name(), option.name, value) + print("Setting option '%s' (%s) -> %s" % \ + (option.display_name(), option.name, value)) option.set(value) self.NotifyOptionChanged(option) def GetOptionValue(self, option = None): @@ -57,8 +57,8 @@ option = self.option ret = option.get() if verbose: - print "Got option '%s' (%s) -> %s" % \ - (option.display_name(), option.name, ret) + print("Got option '%s' (%s) -> %s" % \ + (option.display_name(), option.name, ret)) return ret # Only sub-classes know how to update their controls from the value. @@ -134,10 +134,10 @@ OptionControlProcessor.__init__(self, window, control_ids, option) if text: temp = text.split(",") - self.option_to_text = zip(self.option.valid_input(), temp) - self.text_to_option = dict(zip(temp, self.option.valid_input())) + self.option_to_text = list(zip(self.option.valid_input(), temp)) + self.text_to_option = dict(list(zip(temp, self.option.valid_input()))) else: - self.option_to_text = zip(self.option.valid_input(),self.option.valid_input()) + self.option_to_text = list(zip(self.option.valid_input(),self.option.valid_input())) self.text_to_option = dict(self.option_to_text) def OnCommand(self, wparam, lparam): @@ -248,7 +248,7 @@ str_val = buf[:nchars] val = float(str_val) if val < self.min_val or val > self.max_edit_val: - raise ValueError, "Value must be between %d and %d" % (self.min_val, self.max_val) + raise ValueError("Value must be between %d and %d" % (self.min_val, self.max_val)) self.SetOptionValue(val) class FilenameProcessor(OptionControlProcessor): @@ -263,7 +263,7 @@ return OptionControlProcessor.GetPopupHelpText(self, id) def DoBrowse(self): - from win32struct import OPENFILENAME + from .win32struct import OPENFILENAME ofn = OPENFILENAME(512) ofn.hwndOwner = self.window.hwnd ofn.setFilter(self.file_filter) Modified: branches/python3/spambayes/Outlook2000/dialogs/processors.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/processors.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/processors.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -7,7 +7,7 @@ import win32gui, win32api, win32con import commctrl import struct, array -from dlgutils import * +from .dlgutils import * # Cache our leaky bitmap handles bitmap_handles = {} @@ -43,7 +43,7 @@ def GetMessages(self): return [] def OnMessage(self, msg, wparam, lparam): - raise RuntimeError, "I don't hook any messages, so I shouldn't be called" + raise RuntimeError("I don't hook any messages, so I shouldn't be called") def OnOptionChanged(self, option): pass def OnRButtonUp(self, wparam, lparam): @@ -54,10 +54,10 @@ rcp = self.window.manager.dialog_parser; bmp_id = int(win32gui.GetWindowText(self.GetControl())) - if bitmap_handles.has_key(bmp_id): + if bmp_id in bitmap_handles: handle = bitmap_handles[bmp_id] else: - import resources + from . import resources mod_handle, mod_bmp, extra_flags = resources.GetImageParamsFromBitmapID(rcp, bmp_id) load_flags = extra_flags|win32con.LR_COLOR|win32con.LR_SHARED handle = win32gui.LoadImage(mod_handle, mod_bmp, Modified: branches/python3/spambayes/Outlook2000/dialogs/resources/rc2py.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/resources/rc2py.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/resources/rc2py.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -8,7 +8,7 @@ with the same basic public interface as the rcparser module. """ import sys, os, stat -import rcparser +from . import rcparser def convert(inputFilename = None, outputFilename = None, enableGettext = True): Modified: branches/python3/spambayes/Outlook2000/dialogs/resources/rclabels2text.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/resources/rclabels2text.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/resources/rclabels2text.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -8,7 +8,7 @@ and writes them into a text file for spell checking purposes. """ import sys, os, re -import rcparser +from . import rcparser anti_and = re.compile(r"([^\\]*)&([^&]*)"); anti_nl = re.compile(r"([^\\]*)\\n([^\\])"); @@ -23,7 +23,7 @@ out = open(outputFilename, "wt") for dlg_id in rcp._dialogs: - print dlg_id + print(dlg_id) dlg = rcp._dialogs[dlg_id] out.write("\n================================================\n") out.write("In Dialog: "+str(dlg_id)+" Title: "+str(dlg.caption)+"\n\n") Modified: branches/python3/spambayes/Outlook2000/dialogs/resources/rcparser.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/resources/rcparser.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/resources/rcparser.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -117,7 +117,7 @@ def debug(self, *args): if self.debugEnabled: - print args + print(args) def getToken(self): self.token = self.lex.get_token() @@ -152,7 +152,7 @@ self.parseH(h) h.close() except IOError: - print "No .h file. ignoring." + print("No .h file. ignoring.") f = open(rcFileName) self.open(f) self.getToken() @@ -177,10 +177,10 @@ n = lex.get_token() i = int(lex.get_token()) self.ids[n] = i - if self.names.has_key(i): + if i in self.names: # ignore AppStudio special ones. if not n.startswith("_APS_"): - print "Duplicate id",i,"for",n,"is", self.names[i] + print("Duplicate id",i,"for",n,"is", self.names[i]) else: self.names[i] = n if self.next_id<=i: @@ -214,7 +214,7 @@ self.getToken() # bmpname bmf = self.token[1:-1] # quotes self.bitmaps[possibleBitmap] = bmf - print "BITMAP", possibleBitmap, bmf + print("BITMAP", possibleBitmap, bmf) #print win32gui.LoadImage(0, bmf, win32con.IMAGE_BITMAP,0,0,win32con.LR_DEFAULTCOLOR|win32con.LR_LOADFROMFILE) def addId(self, id_name): @@ -351,8 +351,7 @@ # msvc seems to occasionally replace "IDC_STATIC" with -1 if self.token=='-': if self.getToken() != '1': - raise RuntimeError, \ - "Negative literal in rc script (other than -1) - don't know what to do" + raise RuntimeError("Negative literal in rc script (other than -1) - don't know what to do") self.token = "IDC_STATIC" control.id = self.token control.idNum = self.addId(control.id) @@ -389,11 +388,11 @@ except: lex = getattr(rcp, "lex", None) if lex: - print "ERROR parsing dialogs at line", lex.lineno - print "Next 10 tokens are:" + print("ERROR parsing dialogs at line", lex.lineno) + print("Next 10 tokens are:") for i in range(10): - print lex.get_token(), - print + print(lex.get_token(), end=' ') + print() raise return rcp @@ -402,7 +401,7 @@ rc_file = os.path.join(os.path.dirname(__file__), "dialogs.rc") d = ParseDialogs(rc_file) import pprint - for id, ddef in d.dialogs.items(): - print "Dialog %s (%d controls)" % (id, len(ddef)) + for id, ddef in list(d.dialogs.items()): + print("Dialog %s (%d controls)" % (id, len(ddef))) pprint.pprint(ddef) - print + print() Modified: branches/python3/spambayes/Outlook2000/dialogs/test_dialogs.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/test_dialogs.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/test_dialogs.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -22,7 +22,7 @@ else: ShowDialog(0, mgr, mgr.config, idd) if "-d" in sys.argv: - print "Dumping(but not saving) new manager configuration:" - print mgr.options.display() - print "-- end of configuration --" + print("Dumping(but not saving) new manager configuration:") + print(mgr.options.display()) + print("-- end of configuration --") mgr.Close() Modified: branches/python3/spambayes/Outlook2000/dialogs/win32struct.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/win32struct.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/win32struct.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -49,9 +49,9 @@ t = struct.unpack(self.fs, self.data) ii = 0 for i in self.nlst: - print i, "=", t[ii] + print(i, "=", t[ii]) ii += 1 - print "fs =", self.fs + print("fs =", self.fs) return @@ -94,19 +94,19 @@ return win32gui.PyGetString(self.fn_buf_addr) def setTitle(self, title): - if isinstance(title, unicode): + if isinstance(title, str): title = title.encode("mbcs") self.title_buf = array.array("c", title+'\0') self.lpstrTitle = self.title_buf.buffer_info()[0] def setInitialDir(self, initialDir): - if isinstance(initialDir, unicode): + if isinstance(initialDir, str): initialDir = initialDir.encode("mbcs") self.initialDir_buf = array.array("c", initialDir+'\0') self.lpstrInitialDir = self.initialDir_buf.buffer_info()[0] def setFilter(self, fileFilter): - if isinstance(fileFilter, unicode): + if isinstance(fileFilter, str): fileFilter = fileFilter.encode("mbcs") fileFilter = fileFilter.replace('|', '\0') + '\0' self.fileFilter_buf = array.array("c", fileFilter+'\0') Modified: branches/python3/spambayes/Outlook2000/dialogs/wizard_processors.py =================================================================== --- branches/python3/spambayes/Outlook2000/dialogs/wizard_processors.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/dialogs/wizard_processors.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -7,9 +7,9 @@ import win32gui, win32con, win32api, commctrl from dialogs import ShowDialog, MakePropertyPage -import processors -import opt_processors -import async_processor +from . import processors +from . import opt_processors +from . import async_processor import timer @@ -94,7 +94,7 @@ #backward assert self.page_stack, "Back should be disabled when no back stack" pageNo = self.page_stack.pop() - print "Back button switching to page", pageNo + print("Back button switching to page", pageNo) self.switchToPage(pageNo) def switchToPage(self, index): @@ -103,7 +103,7 @@ return 1 win32gui.DestroyWindow(self.currentPageHwnd) #template = self.window.manager.dialog_parser.dialogs[self.page_ids[index]] - import dlgcore + from . import dlgcore self.currentPage = MakePropertyPage(self.page_placeholder_hwnd, self.window.manager, self.window.config, @@ -166,7 +166,7 @@ index = self.currentPageIndex id = self.page_ids[index] config = self.window.config - print "GetNextPage with current", index, id + print("GetNextPage with current", index, id) if id == 'IDD_WIZARD_WELCOME': # Welcome page if config.wizard.preparation == 0: # unprepared Modified: branches/python3/spambayes/Outlook2000/export.py =================================================================== --- branches/python3/spambayes/Outlook2000/export.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/export.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -101,7 +101,7 @@ num = 0 store = manager.message_store for folder in store.GetFolderGenerator(folder_ids, include_sub): - print "", folder.name + print("", folder.name) for message in folder.GetMessageGenerator(): this_dir = os.path.join(root, choice(buckets)) # filename is the EID.txt @@ -110,8 +110,8 @@ except KeyboardInterrupt: raise except: - print "Failed to get message text for '%s': %s" \ - % (message.GetSubject(), sys.exc_info()[1]) + print("Failed to get message text for '%s': %s" \ + % (message.GetSubject(), sys.exc_info()[1])) continue fname = os.path.join(this_dir, message.GetID()[1]) + ".txt" @@ -124,12 +124,12 @@ # This does all the work. 'directory' is the parent directory for the # generated Ham and Spam sub-folders. def export(directory, num_buckets, old_style): - print "Loading bayes manager..." + print("Loading bayes manager...") manager = GetManager() config = manager.config num_spam, num_ham, buckets = BuildBuckets(manager, num_buckets) - print "Have", num_spam, "spam and", num_ham, "ham to export,", - print "spread over", len(buckets), "directories." + print("Have", num_spam, "spam and", num_ham, "ham to export,", end=' ') + print("spread over", len(buckets), "directories.") for sub in "Spam", "Ham": if os.path.exists(os.path.join(directory, sub)): @@ -138,30 +138,30 @@ d = os.path.join(directory, sub, b) os.makedirs(d) - print "Exporting spam..." + print("Exporting spam...") num = _export_folders(manager, os.path.join(directory, "Spam"), buckets, config.training.spam_folder_ids, config.training.spam_include_sub, old_style) - print "Exported", num, "spam messages." + print("Exported", num, "spam messages.") - print "Exporting ham..." + print("Exporting ham...") num = _export_folders(manager, os.path.join(directory, "Ham"), buckets, config.training.ham_folder_ids, config.training.ham_include_sub, old_style) - print "Exported", num, "ham messages." + print("Exported", num, "ham messages.") def main(): import getopt try: opts, args = getopt.getopt(sys.argv[1:], "hqon:") - except getopt.error, d: + except getopt.error as d: usage(d) quiet = 0 old_style = False @@ -190,24 +190,24 @@ usage("-n must be at least 1.") directory = os.path.abspath(directory) - print "This program will export your Outlook Ham and Spam folders" - print "to the directory '%s'" % directory + print("This program will export your Outlook Ham and Spam folders") + print("to the directory '%s'" % directory) if os.path.exists(directory): - print "*******" - print "WARNING: all existing files in '%s' will be deleted" % directory - print "*******" + print("*******") + print("WARNING: all existing files in '%s' will be deleted" % directory) + print("*******") if not quiet: - raw_input("Press enter to continue, or Ctrl+C to abort.") + input("Press enter to continue, or Ctrl+C to abort.") export(directory, num_buckets, old_style=old_style) # Display errormsg (if specified), a blank line, and usage information; then # exit with status 1 (usage doesn't return). def usage(errormsg=None): if errormsg: - print str(errormsg) - print + print(str(errormsg)) + print() - print """ \ + print(""" \ Usage: %s [-h] [-q] [-n nsets] [directory] -h : help - display this msg and stop @@ -226,7 +226,7 @@ the export (but you will be asked to confirm unless -q is given).""" \ % (os.path.basename(sys.argv[0]), NUM_BUCKETS, - DEFAULT_DIRECTORY) + DEFAULT_DIRECTORY)) sys.exit(1) if __name__=='__main__': Modified: branches/python3/spambayes/Outlook2000/filter.py =================================================================== --- branches/python3/spambayes/Outlook2000/filter.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/filter.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -76,10 +76,10 @@ # Clear dirty flag anyway mgr.LogDebug(1, "Message is read-only - could not save Spam score") msg.dirty = False - except ms.MsgStoreException, details: + except ms.MsgStoreException as details: # Some other error saving - this is nasty. - print "Unexpected MAPI error saving the spam score for", msg - print details + print("Unexpected MAPI error saving the spam score for", msg) + print(details) # Clear dirty flag anyway msg.dirty = False @@ -95,8 +95,8 @@ try: dest_folder = ms.GetFolder(folder_id) except ms.MsgStoreException: - print "ERROR: Unable to open the folder to Copy the " \ - "message - this message was not copied" + print("ERROR: Unable to open the folder to Copy the " \ + "message - this message was not copied") else: msg.CopyToReportingError(mgr, dest_folder) mgr.LogDebug(1, "Copied message '%s' to folder '%s'" \ @@ -105,14 +105,14 @@ try: dest_folder = ms.GetFolder(folder_id) except ms.MsgStoreException: - print "ERROR: Unable to open the folder to Move the " \ - "message - this message was not moved" + print("ERROR: Unable to open the folder to Move the " \ + "message - this message was not moved") else: msg.MoveToReportingError(mgr, dest_folder) mgr.LogDebug(1, "Moved message '%s' to folder '%s'" \ % (msg.subject, dest_folder.GetFQName())) else: - raise RuntimeError, "Eeek - bad action '%r'" % (action,) + raise RuntimeError("Eeek - bad action '%r'" % (action,)) if all_actions: mgr.stats.RecordClassification(prob) @@ -121,7 +121,7 @@ mgr.classifier_data.SavePostIncrementalTrain() return disposition except: - print "Failed filtering message!", msg + print("Failed filtering message!", msg) import traceback traceback.print_exc() return "Failed" @@ -143,7 +143,7 @@ disposition = filter_message(message, mgr, all_actions) except: import traceback - print "Error filtering message '%s'" % (message,) + print("Error filtering message '%s'" % (message,)) traceback.print_exc() disposition = "Error" @@ -167,13 +167,13 @@ for f in mgr.message_store.GetFolderGenerator(config.folder_ids, config.include_sub): progress.set_status(_("Filtering folder '%s'") % (f.name)) this_dispositions = filter_folder(f, mgr, config, progress) - for key, val in this_dispositions.items(): + for key, val in list(this_dispositions.items()): dispositions[key] = dispositions.get(key, 0) + val if progress.stop_requested(): return # All done - report what we did. err_text = "" - if dispositions.has_key("Error"): + if "Error" in dispositions: err_text = _(" (%d errors)") % dispositions["Error"] dget = dispositions.get text = _("Found %d spam, %d unsure and %d good messages%s") % \ @@ -181,7 +181,7 @@ progress.set_status(text) def main(): - print "Sorry - we don't do anything here any more" + print("Sorry - we don't do anything here any more") if __name__ == "__main__": main() Modified: branches/python3/spambayes/Outlook2000/manager.py =================================================================== --- branches/python3/spambayes/Outlook2000/manager.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/manager.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -1,6 +1,6 @@ -from __future__ import generators -import cPickle + +import pickle import os import sys import errno @@ -10,7 +10,7 @@ import operator import win32api, win32con, win32gui -import timer, thread +import timer, _thread import win32com.client import win32com.client.gencache @@ -40,7 +40,7 @@ def ReportError(message, title = None): import traceback - print "ERROR:", repr(message) + print("ERROR:", repr(message)) if sys.exc_info()[0] is not None: traceback.print_exc() if title is None: title = "SpamBayes" @@ -132,7 +132,7 @@ # Convert if necessary. use_names = [] for name in ini_filenames: - if isinstance(name, unicode): + if isinstance(name, str): name = name.encode(filesystem_encoding) use_names.append(name) os.environ["BAYESCUSTOMIZE"] = os.pathsep.join(use_names) @@ -157,7 +157,7 @@ temp_filename = filename + ".tmp" file = open(temp_filename,"wb") try: - cPickle.dump(what, file, 1) + pickle.dump(what, file, 1) finally: file.close() # now rename to the correct file. @@ -183,7 +183,7 @@ # Just delete the file and do an "open" try: os.unlink(self.bayes_filename) - except EnvironmentError, e: + except EnvironmentError as e: if e.errno != errno.ENOENT: raise return self.open_bayes() def store_bayes(self, bayes): @@ -195,7 +195,7 @@ def open_mdb(self): # MessageInfo storage types may lag behind, so use pickle if the # matching type isn't available. - if self.klass in bayes_message._storage_types.keys(): + if self.klass in list(bayes_message._storage_types.keys()): return bayes_message.open_storage(self.mdb_filename, self.klass) return bayes_message.open_storage(self.mdb_filename, "pickle") def store_mdb(self, mdb): @@ -217,7 +217,7 @@ def new_mdb(self): try: os.unlink(self.mdb_filename) - except EnvironmentError, e: + except EnvironmentError as e: if e.errno != errno.ENOENT: raise return self.open_mdb() def is_incremental(self): @@ -247,11 +247,11 @@ # file-not-found handled gracefully by storage. bayes = self.db_manager.open_bayes() fname = self.db_manager.bayes_filename.encode("mbcs", "replace") - print "Loaded bayes database from '%s'" % (fname,) + print("Loaded bayes database from '%s'" % (fname,)) message_db = self.db_manager.open_mdb() fname = self.db_manager.mdb_filename.encode("mbcs", "replace") - print "Loaded message database from '%s'" % (fname,) + print("Loaded message database from '%s'" % (fname,)) self.logger.LogDebug(0, "Bayes database initialized with " "%d spam and %d good messages" % (bayes.nspam, bayes.nham)) @@ -284,7 +284,7 @@ else: self.logger.LogDebug(1, "Bayes database is not dirty - not writing") else: - print "Using a slow database - not saving after incremental train" + print("Using a slow database - not saving after incremental train") def Save(self): import time @@ -292,19 +292,19 @@ bayes = self.bayes if self.logger.verbose: - print "Saving bayes database with %d spam and %d good messages" %\ - (bayes.nspam, bayes.nham) - print " ->", self.db_manager.bayes_filename + print("Saving bayes database with %d spam and %d good messages" %\ + (bayes.nspam, bayes.nham)) + print(" ->", self.db_manager.bayes_filename) self.db_manager.store_bayes(self.bayes) if self.logger.verbose: - print " ->", self.db_manager.mdb_filename + print(" ->", self.db_manager.mdb_filename) self.db_manager.store_mdb(self.message_db) self.dirty = False self.logger.LogDebug(1, "Saved databases in %gms" % ((time.clock()-start)*1000)) def Close(self): if self.dirty and self.bayes: - print "Warning: ClassifierData closed while Bayes database dirty" + print("Warning: ClassifierData closed while Bayes database dirty") if self.db_manager: self.db_manager.close_bayes(self.bayes) self.db_manager.close_mdb(self.message_db) @@ -339,14 +339,14 @@ if use_db not in available: # User is trying to use something fancy which isn't available. # Fall back on bsddb. - print use_db, "storage type not available. Using bsddb." + print(use_db, "storage type not available. Using bsddb.") use_db = "dbm" return available[use_db] # Our main "bayes manager" class BayesManager: def __init__(self, config_base="default", outlook=None, verbose=0): - self.owner_thread_ident = thread.get_ident() # check we aren't multi-threaded + self.owner_thread_ident = _thread.get_ident() # check we aren't multi-threaded self.never_configured = True self.reported_error_map = {} self.reported_startup_error = False @@ -387,16 +387,16 @@ value = value.decode(filesystem_encoding) except AttributeError: # May already be Unicode pass - assert isinstance(value, types.UnicodeType), "%r should be a unicode" % value + assert isinstance(value, str), "%r should be a unicode" % value try: if not os.path.isdir(value): os.makedirs(value) assert os.path.isdir(value), "just made the *ucker" value = os.path.abspath(value) except os.error: - print "The configuration files have specified a data " \ + print("The configuration files have specified a data " \ "directory of", repr(value), "but it is not valid. " \ - "Using default." + "Using default.") value = None if value: self.data_directory = value @@ -468,19 +468,19 @@ def LogDebug(self, level, *args): if self.verbose >= level: for arg in args[:-1]: - print arg, - print args[-1] + print(arg, end=' ') + print(args[-1]) def ReportError(self, message, title = None): if self.test_suite_running: - print "ReportError:", repr(message) - print "(but test suite running - not reported)" + print("ReportError:", repr(message)) + print("(but test suite running - not reported)") return ReportError(message, title) def ReportInformation(self, message, title=None): if self.test_suite_running: - print "ReportInformation:", repr(message) - print "(but test suite running - not reported)" + print("ReportInformation:", repr(message)) + print("(but test suite running - not reported)") return ReportInformation(message, title) def AskQuestion(self, message, title=None): @@ -506,19 +506,19 @@ else: # We have reported the error, but for the sake of the log, we # still want it logged there. - print "ERROR:", repr(message) + print("ERROR:", repr(message)) traceback.print_exc() def ReportErrorOnce(self, msg, title = None, key = None): if key is None: key = msg # Always print the message and traceback. if self.test_suite_running: - print "ReportErrorOnce:", repr(msg) - print "(but test suite running - not reported)" + print("ReportErrorOnce:", repr(msg)) + print("(but test suite running - not reported)") return - print "ERROR:", repr(msg) + print("ERROR:", repr(msg)) if key in self.reported_error_map: - print "(this error has already been reported - not displaying it again)" + print("(this error has already been reported - not displaying it again)") else: traceback.print_exc() self.reported_error_map[key] = True @@ -618,15 +618,15 @@ True, # Add to folder format) outlook_message.Save() - except pythoncom.com_error, details: + except pythoncom.com_error as details: if msgstore.IsReadOnlyCOMException(details): self.LogDebug(1, "The folder '%s' is read-only - user " "property can't be added" % (folder_name,)) else: - print "Warning: failed to create the Outlook " \ + print("Warning: failed to create the Outlook " \ "user-property in folder '%s'" \ - % (folder_name,) - print "", details + % (folder_name,)) + print("", details) msgstore_folder.DeleteMessages((message,)) # Check our DoesFolderHaveOutlookField logic holds up. if not msgstore_folder.DoesFolderHaveOutlookField(field_name): @@ -674,10 +674,10 @@ # should only happen in source-code versions - older win32alls can't # determine this. profile_name = "unknown_profile" - print "*** NOTE: It appears you are running the source-code version of" - print "* SpamBayes, and running a win32all version pre 154." - print "* If you work with multiple Outlook profiles, it is recommended" - print "* you upgrade - see http://starship.python.net/crew/mhammond""" + print("*** NOTE: It appears you are running the source-code version of") + print("* SpamBayes, and running a win32all version pre 154.") + print("* If you work with multiple Outlook profiles, it is recommended") + print("* you upgrade - see http://starship.python.net/crew/mhammond""") return profile_name def LoadConfig(self): @@ -702,9 +702,9 @@ config.MigrateOptions(self.options) if self.verbose > 1: - print "Dumping loaded configuration:" - print self.options.display() - print "-- end of configuration --" + print("Dumping loaded configuration:") + print(self.options.display()) + print("-- end of configuration --") def MigrateOldPickle(self): assert self.config is not None, "Must have a config" @@ -715,12 +715,12 @@ except IOError: self.LogDebug(1, "No old pickle file to migrate") return - print "Migrating old pickle '%s'" % pickle_filename + print("Migrating old pickle '%s'" % pickle_filename) try: try: - old_config = cPickle.load(f) + old_config = pickle.load(f) except: - print "FAILED to load old pickle" + print("FAILED to load old pickle") traceback.print_exc() msg = _("There was an error loading your old\r\n" \ "SpamBayes configuration file.\r\n\r\n" \ @@ -733,14 +733,14 @@ finally: f.close() if old_config is not None: - for section, items in old_config.__dict__.items(): - print " migrating section '%s'" % (section,) + for section, items in list(old_config.__dict__.items()): + print(" migrating section '%s'" % (section,)) # exactly one value wasn't in a section - now in "general" dict = getattr(items, "__dict__", None) if dict is None: dict = {section: items} section = "general" - for name, value in dict.items(): + for name, value in list(dict.items()): sect = getattr(self.config, section) setattr(sect, name, value) # Save the config, then delete the pickle so future attempts to @@ -769,12 +769,12 @@ # Update our runtime verbosity from the options. self.verbose = self.config.general.verbose - print "Saving configuration ->", self.config_filename.encode("mbcs", "replace") + print("Saving configuration ->", self.config_filename.encode("mbcs", "replace")) assert self.config and self.options, "Have no config to save!" if self.verbose > 1: - print "Dumping configuration to save:" - print self.options.display() - print "-- end of configuration --" + print("Dumping configuration to save:") + print(self.options.display()) + print("-- end of configuration --") self.options.update_file(self.config_filename) def Save(self): @@ -847,11 +847,11 @@ if config.unsure_folder_id: try: unsure_folder = ms.GetFolder(config.unsure_folder_id) - except ms.MsgStoreException, details: + except ms.MsgStoreException as details: return _("The unsure folder is invalid: %s") % (details,) try: spam_folder = ms.GetFolder(config.spam_folder_id) - except ms.MsgStoreException, details: + except ms.MsgStoreException as details: return _("The spam folder is invalid: %s") % (details,) if ok_to_enable: for folder in ms.GetFolderGenerator(config.watch_folder_ids, @@ -894,8 +894,8 @@ def ShowHtml(self,url): """Displays the main SpamBayes documentation in your Web browser""" - import sys, os, urllib - if urllib.splittype(url)[0] is None: # just a file spec + import sys, os, urllib.request, urllib.parse, urllib.error + if urllib.parse.splittype(url)[0] is None: # just a file spec if hasattr(sys, "frozen"): # New binary is in ../docs/outlook relative to executable. fname = os.path.join(os.path.dirname(sys.argv[0]), @@ -938,9 +938,9 @@ self._DoStartNotifyTimer(delay) def _DoStartNotifyTimer(self, delay): - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident assert self.notify_timer_id is None, "Shouldn't start a timer when already have one" - assert isinstance(delay, types.FloatType), "Timer values are float seconds" + assert isinstance(delay, float), "Timer values are float seconds" # And start a new timer. assert delay, "No delay means no timer!" delay = int(delay*1000) # convert to ms. @@ -948,7 +948,7 @@ self.LogDebug(1, "Notify timer started - id=%d, delay=%d" % (self.notify_timer_id, delay)) def _KillNotifyTimer(self): - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident if self.notify_timer_id is not None: timer.kill_timer(self.notify_timer_id) self.LogDebug(2, "The notify timer with id=%d was stopped" % self.notify_timer_id) @@ -956,7 +956,7 @@ def _NotifyTimerFunc(self, event, time): # Kill the timer first - assert thread.get_ident() == self.owner_thread_ident + assert _thread.get_ident() == self.owner_thread_ident self.LogDebug(1, "The notify timer with id=%s fired" % self.notify_timer_id) self._KillNotifyTimer() @@ -999,7 +999,7 @@ return 0 def usage(): - print "Usage: manager [-v ...]" + print("Usage: manager [-v ...]") sys.exit(1) if __name__=='__main__': Modified: branches/python3/spambayes/Outlook2000/msgstore.py =================================================================== --- branches/python3/spambayes/Outlook2000/msgstore.py 2009-11-09 02:30:03 UTC (rev 3253) +++ branches/python3/spambayes/Outlook2000/msgstore.py 2009-11-09 02:59:10 UTC (rev 3254) @@ -1,5 +1,5 @@ -from __future__ import generators + import sys, os, re import locale from time import timezone @@ -13,9 +13,9 @@ from email.Utils import formatdate try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO # MAPI imports etc. from win32com.client import Dispatch, constants @@ -64,7 +64,7 @@ test_suite_failure_count -= 1 if test_suite_failure_count==0: test_suite_failure_request = None - raise test_suite_failure[0], test_suite_failure[1] + raise test_suite_failure[0](test_suite_failure[1]) # Exceptions raised by this module. Raw MAPI exceptions should never # be raised to the caller. @@ -83,7 +83,7 @@ # Python silently consumes exceptions here, and uses # except: - print "FAILED to str() a MsgStore exception!" + print("FAILED to str() a MsgStore exception!") import traceback traceback.print_exc() @@ -307,23 +307,23 @@ for folder_id in folder_ids: try: folder_id = self.NormalizeID(folder_id) - except MsgStoreException, details: - print "NOTE: Skipping invalid folder", details + except MsgStoreException as details: + print("NOTE: Skipping invalid folder", details) continue try: folder = self._OpenEntry(folder_id) table = folder.GetContentsTable(0) - except pythoncom.com_error, details: + except pythoncom.com_error as details: # We will ignore *all* such errors for the time # being, but give verbose details for results we don't # know about if IsNotAvailableCOMException(details): - print "NOTE: Skipping folder for this session - temporarily unavailable" + print("NOTE: Skipping folder for this session - temporarily unavailable") elif IsNotFoundCOMException(details): - print "NOTE: Skipping deleted folder" + print("NOTE: Skipping deleted folder") else: - print "WARNING: Unexpected MAPI error opening folder" - print GetCOMExceptionString(details) + print("WARNING: Unexpected MAPI error opening folder") + print(GetCOMExceptionString(details)) continue rc, props = folder.GetProps( (PR_DISPLAY_NAME_A,), 0) yield MAPIMsgStoreFolder(self, folder_id, props[0][1], @@ -350,7 +350,7 @@ folder_id = folder_id[0], props[0][1] return MAPIMsgStoreFolder(self, folder_id, props[1][1], table.GetRowCount(0)) - except pythoncom.com_error, details: + except pythoncom.com_error as details: raise MsgStoreExceptionFromCOMException(details) def GetMessage(self, message_id): @@ -367,7 +367,7 @@ mapi_object = self._OpenEntry(message_id) hr, data = mapi_object.GetProps(MAPIMsgStoreMsg.message_init_props,0) return MAPIMsgStoreMsg(self, data) - except pythoncom.com_error, details: + except pythoncom.com_error as details: raise MsgStoreExceptionFromCOMException(details) def YieldReceiveFolders(self, msg_class = "IPM.Note"): @@ -386,9 +386,9 @@ @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.