Chris Green <[email protected]> writes: > Chris Green <[email protected]> wrote: >> I'm having a real hard time trying to do anything to a string (?) >> returned by mailbox.MaildirMessage.get(). >> > What a twit I am :-) > > Strings are immutable, I have to do:- > > newstring = oldstring.replace("_", " ") > > Job done!
Not necessarily. The subject in the original article was: =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?= That's some kind of MIME encoding. Just replacing underscores by spaces won't necessarily give you anything meaningful. (What if there are actual underscores in the original subject line?) You should probably apply some kind of MIME-specific decoding. (I don't have a specific suggestion for how to do that.) -- Keith Thompson (The_Other_Keith) [email protected] Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */ -- https://mail.python.org/mailman/listinfo/python-list
