Re: Correct module for site customization of path

2024-11-01 Thread Tim Johnson via Python-list
On 11/1/24 08:32, dieter.mau...@online.de wrote: ... After the recent upgrades I had to install youtube_dl with pipx for the new python version. When I ran the script which imported youtube_dl, I got an import error as it appears the path to the module was not in sys.path I see at several op

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Left Right via Python-list
> 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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Barry via Python-list
> 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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Cameron Simpson via Python-list
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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Cameron Simpson via Python-list
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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Cameron Simpson via Python-list
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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Dieter Maurer via Python-list
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

Re: Correct module for site customization of path

2024-11-01 Thread Dieter Maurer via Python-list
> ... >After the recent upgrades I had to install youtube_dl with pipx for the >new python version. >When I ran the script which imported youtube_dl, I got an import error >as it appears the path to the module >was not in sys.path I see at several options: * install `youtoube_dl` where Pytho

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Loris Bennett via Python-list
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

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread 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 Windows doesn't have or use > terminals (that's more of a Unix-related concept). And, by "te

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Loris Bennett via Python-list
"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.