On 04Nov2024 13:02, Loris Bennett wrote:
OK, so I can do:
##
if args.verbose:
for k in mail.keys():
print(f"{k}: {mail.get(k)}")
print('')
print(mail.get_content())
##
On 2024-11-04 13:02:21 +0100, Loris Bennett via Python-list wrote:
> "Loris Bennett" writes:
> > "Loris Bennett" writes:
> >> Cameron Simpson writes:
> >>> On 01Nov2024 10:10, Loris Bennett wrote:
> as expected. The non-UTF-8 text occurs when I do
>
> mail = EmailMessage()
> >>>
"Loris Bennett" writes:
> "Loris Bennett" writes:
>
>> Cameron Simpson writes:
>>
>>> On 01Nov2024 10:10, Loris Bennett wrote:
as expected. The non-UTF-8 text occurs when I do
mail = EmailMessage()
mail.set_content(body, cte="quoted-printable")
...
if arg
"Loris Bennett" writes:
> Cameron Simpson writes:
>
>> On 01Nov2024 10:10, Loris Bennett wrote:
>>>as expected. The non-UTF-8 text occurs when I do
>>>
>>> mail = EmailMessage()
>>> mail.set_content(body, cte="quoted-printable")
>>> ...
>>>
>>> if args.verbose:
>>> print(mail)
>>>
>>>
Inada Naoki writes:
> 2024年11月2日(土) 0:36 Loris Bennett via Python-list :
>
>> Left Right writes:
>>
>> > There's quite a lot of misuse of terminology around terminal / console
>> > / shell. Please, correct me if I'm wrong, but it looks like you are
>> > printing that on MS Windows, right? MS W
Cameron Simpson writes:
> On 01Nov2024 10:10, Loris Bennett wrote:
>>as expected. The non-UTF-8 text occurs when I do
>>
>> mail = EmailMessage()
>> mail.set_content(body, cte="quoted-printable")
>> ...
>>
>> if args.verbose:
>> print(mail)
>>
>>which is presumably also correct.
>>
>>T
Try PYTHONUTF8=1 envver.
2024年11月2日(土) 0:36 Loris Bennett via Python-list :
> Left Right writes:
>
> > There's quite a lot of misuse of terminology around terminal / console
> > / shell. Please, correct me if I'm wrong, but it looks like you are
> > printing that on MS Windows, right? MS Windo
In comp.lang.python, Gilmeh Serda wrote:
> Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> help('modules')
>
> Please wait a moment while I gather a list of all available modules...
>
> Ass
On 2024-11-01, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.python, Gilmeh Serda wrote:
>> Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> help('modules')
>>
>> Please wai
> On 1 Nov 2024, at 22:57, Left Right wrote:
>
> Does this Windows Terminal support the use
> of programs like tmux?
I have not tried, but should work.
Best to install the terminal app from the MS app store.
Most use I make is to ssh into linux systems and stuff like editors.
Colour output a
> Windows does now. They implemented this feature over the last few years.
> Indeed they took inspiration from how linux does this.
>
> You might find https://devblogs.microsoft.com/commandline/ has interesting
> articles about this.
I don't have MS Windows. My wife does, but I don't want to both
> On 31 Oct 2024, at 16:42, Left Right via Python-list
> wrote:
>
> MS Windows doesn't have or use
> terminals (that's more of a Unix-related concept).
Windows does now. They implemented this feature over the last few years.
Indeed they took inspiration from how linux does this.
You might f
On 31Oct2024 21:53, alan.ga...@yahoo.co.uk wrote:
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
If you're just dealing with this directly, use the `quopri` stdlib
module: https://docs.python.org/3/library/quopri.html
One of the things I love about this list are these little feat
On 01Nov2024 10:10, Loris Bennett wrote:
as expected. The non-UTF-8 text occurs when I do
mail = EmailMessage()
mail.set_content(body, cte="quoted-printable")
...
if args.verbose:
print(mail)
which is presumably also correct.
The question is: What conversion is necessary in order t
On 01Nov2024 08:11, Loris Bennett wrote:
Cameron Simpson writes:
If you're using the Python email module to parse (or construct) the
message as a `Message` object I'd expect that to happen automatically.
I am using
email.message.EmailMessage
Noted. That seems like the correct approach to
Loris Bennett wrote at 2024-11-1 10:10 +0100:
> ...
> mail.set_content(body, cte="quoted-printable")
In the line above, you request the content to use
the "cte" (= "Content-Transfer-Encoding") "quoted-printable"
and consequently, the content is encoded with `quoted-printable`.
Maybe, you do not n
Cameron Simpson writes:
> On 31Oct2024 16:33, Loris Bennett wrote:
>>I have a command-line program which creates an email containing German
>>umlauts. On receiving the mail, my mail client displays the subject and
>>body correctly:
> [...]
>>So far, so good. However, when I use the --verbose o
Left Right writes:
> There's quite a lot of misuse of terminology around terminal / console
> / shell. Please, correct me if I'm wrong, but it looks like you are
> printing that on MS Windows, right? MS Windows doesn't have or use
> terminals (that's more of a Unix-related concept). And, by "te
"Loris Bennett" writes:
> Cameron Simpson writes:
>
>> On 31Oct2024 16:33, Loris Bennett wrote:
>>>I have a command-line program which creates an email containing German
>>>umlauts. On receiving the mail, my mail client displays the subject and
>>>body correctly:
>> [...]
>>>So far, so good.
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
> That looks to me like quoted-printable. This is an encoding for binary
> transport of text to make it robust against not 8-buit clean
...
> If you're just dealing with this directly, use the `quopri` stdlib
> module: https://docs.py
On 31Oct2024 16:33, Loris Bennett wrote:
I have a command-line program which creates an email containing German
umlauts. On receiving the mail, my mail client displays the subject and
body correctly:
[...]
So far, so good. However, when I use the --verbose option to print
the mail to the ter
There's quite a lot of misuse of terminology around terminal / console
/ shell. Please, correct me if I'm wrong, but it looks like you are
printing that on MS Windows, right? MS Windows doesn't have or use
terminals (that's more of a Unix-related concept). And, by "terminal"
I mean terminal emula
Hi,
I have a command-line program which creates an email containing German
umlauts. On receiving the mail, my mail client displays the subject and
body correctly:
Subject: Übung
Sehr geehrter Herr Dr. Bennett,
Dies ist eine Übung.
So far, so good. However, when I use the --verbose opti
[EMAIL PROTECTED] wrote:
> I am new to unicode so please bear with my stupidity.
>
> I am doing the following in a Python IDE called Wing with Python 23.
>
> >>> s = "äöü"
>From later evidence, this string is encoded as utf-8. Looks like Wing
must be using an implicit "# coding: utf-8" for interac
I am new to unicode so please bear with my stupidity.
I am doing the following in a Python IDE called Wing with Python 23.
>>> s = "äöü"
>>> print s
äöü
>>> print s
äöü
>>> s
'\xc3\xa4\xc3\xb6\xc3\xbc'
>>> s.decode('utf-8')
u'\xe4\xf6\xfc'
>>> u = s.decode('utf-8')
>>> u
u'\xe4\xf6\xfc'
>>>
25 matches
Mail list logo