On 2023-05-06 16:27:04 +0200, jak wrote:
> Chris Green ha scritto:
> > Chris Green wrote:
> > > A bit more information, msg.get("subject", "unknown") does return a
> > > string, as follows:-
> > >
> > > Subject:
> > > =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=
Chris Green wrote at 2023-5-6 15:58 +0100:
>Chris Green 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("_", " ")
The sol
Chris Green writes:
> Chris Green 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 necess
Peter Pearson ha scritto:
On Sat, 6 May 2023 14:50:40 +0100, Chris Green wrote:
[snip]
So, what do those =?utf-8? and ?= sequences mean? Are they part of
the string or are they wrapped around the string on output as a way to
show that it's utf-8 encoded?
Yes, "=?utf-8?" signals "MIME header
On Sat, 6 May 2023 14:50:40 +0100, Chris Green wrote:
[snip]
> So, what do those =?utf-8? and ?= sequences mean? Are they part of
> the string or are they wrapped around the string on output as a way to
> show that it's utf-8 encoded?
Yes, "=?utf-8?" signals "MIME header encoding".
I've only bl
Chris Green ha scritto:
Chris Green wrote:
A bit more information, msg.get("subject", "unknown") does return a
string, as follows:-
Subject:
=?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=
So it's the 'searchTxt in msg.get("subject", "unknown")' that's
failing.
Chris Green ha scritto:
Keith Thompson wrote:
Chris Green writes:
Chris Green 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(
I'm having a real hard time trying to do anything to a string (?)
returned by mailbox.MaildirMessage.get().
I'm extracting the Subject: header from a message and, if I write what
it returns to a log file using the python logging module what I see
in the log file (when the Subject: has non-ASCII ch
Keith Thompson wrote:
> Chris Green writes:
> > Chris Green 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.
Chris Green wrote:
> A bit more information, msg.get("subject", "unknown") does return a
> string, as follows:-
>
> Subject:
> =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=
>
> So it's the 'searchTxt in msg.get("subject", "unknown")' that's
> failing. I.e. for so
Chris Green 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!
--
Chris Green
ยท
--
https://mail.python.org/m
A bit more information, msg.get("subject", "unknown") does return a
string, as follows:-
Subject:
=?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=
So it's the 'searchTxt in msg.get("subject", "unknown")' that's
failing. I.e. for some reason 'in' isn't working when th
Chris Green ha scritto:
I have a custom mail filter in python that uses the mailbox package to
open a mail message and give me access to the headers.
So I have the following code to open each mail message:-
#
#
# Read the message from standard input and make a message object from
On 5/5/23 04:39, c.bu...@posteo.jp wrote:
That being said, the git repo linked earlier has accepted commits to
that file earlier this year. So read in to that what you will *shrugs*
--
https://mail.python.org/mailman/listinfo/python-list
I have a custom mail filter in python that uses the mailbox package to
open a mail message and give me access to the headers.
So I have the following code to open each mail message:-
#
#
# Read the message from standard input and make a message object from it
#
msg = mailb
On 5/5/23 04:39, c.bu...@posteo.jp wrote:
Thanks for the answer.
Am 05.05.2023 03:24 schrieb aapost:
pygettext is deprecated since xgettext supports python now, so using
xgettext is recommended.
If this is the official case then it should be mentioned in the python
docs. The 3.11 docs still
16 matches
Mail list logo