Py3k,email header handling

2011-05-11 Thread TheSaint
Hello, some time ago, I wrote a program to eliminate undesided emails from the server(s) and leave those which comply to certain filter criteria. I started it when I got to know whit Python 2.3. Now a days I'd like to spend some time to improve it, just for my interest, however it didn't

Re: Py3k,email header handling

2011-05-11 Thread Steven D'Aprano
On Wed, 11 May 2011 16:04:13 +0800, TheSaint wrote: Now python 3.2 (and some version before) started to use byte, rather than text strings, almost for all data handling in compliance to unicode. My problem arise that my program handle text strings, so I'd like to rewrite the code Before you

Re: Py3k,email header handling

2011-05-11 Thread TheSaint
Steven D'Aprano wrote: Before you re-write it, you should run 2to3 over it and see how much it can do automatically: Widely done, only the results from some query has radically changed on favour of unicode. Errors raising about results which are not strings anymore. I'm afraid I don't

Re: Py3k,email header handling

2011-05-11 Thread Terry Reedy
On 5/11/2011 12:27 PM, TheSaint wrote: Steven D'Aprano wrote: Before you re-write it, you should run 2to3 over it and see how much it can do automatically: Widely done, only the results from some query has radically changed on favour of unicode. Errors raising about results which are not