Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #355: Boredom in the Kernel.


comp / comp.lang.python / Re: Printing UTF-8 mail to terminal

SubjectAuthor
* Re: Printing UTF-8 mail to terminalAlan Gauld
`* Re: Printing UTF-8 mail to terminalGilmeh Serda
 +- Re: Printing UTF-8 mail to terminal (Posting On Python-List Prohibited)Lawrence D'Oliveiro
 `* Re: Printing UTF-8 mail to terminalEli the Bearded
  +- Re: Printing UTF-8 mail to terminalJon Ribbens
  `- Re: Printing UTF-8 mail to terminal (Posting On Python-List Prohibited)Lawrence D'Oliveiro

1
Subject: Re: Printing UTF-8 mail to terminal
From: Alan Gauld
Newsgroups: comp.lang.python
Date: Thu, 31 Oct 2024 21:53 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: learn2program@gmail.com (Alan Gauld)
Newsgroups: comp.lang.python
Subject: Re: Printing UTF-8 mail to terminal
Date: Thu, 31 Oct 2024 21:53:31 +0000
Lines: 23
Message-ID: <mailman.64.1730411614.4695.python-list@python.org>
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
Reply-To: alan.gauld@yahoo.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de C5upXSpjO/nvmkAnOPe14wYvseN44bNF9RF2K6UCLikQ==
Cancel-Lock: sha1:OD3f6qP4o5Pu7QZZuj2uxMiNeZo= sha256:2kMkJ+1eu4q9Od7+OZc/DT5qybQRbbnNm84CoHNgbyE=
Return-Path: <learn2program@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=l0jOAB/p;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'looks': 0.02; 'despite':
0.05; ':-)': 0.09; 'module:': 0.09; 'received:mail-
wr1-x42d.google.com': 0.09; 'cameron': 0.16; 'directly,': 0.16;
'encoding': 0.16; 'flickr': 0.16; 'from:name:alan gauld': 0.16;
'message-id:@yahoo.co.uk': 0.16; 'photo-blog': 0.16; 'reply-
to:addr:alan.gauld': 0.16; 'simpson': 0.16; 'stdlib': 0.16; 'url-
ip:79.170.44.132/32': 0.16; 'url-ip:79.170.44/24': 0.16; 'url-
ip:79.170/16': 0.16; 'url-ip:79/8': 0.16; 'url:alan-g': 0.16;
'url:alan_gauld': 0.16; 'url:alangauldphotos': 0.16; 'wrote:':
0.16; 'python': 0.16; 'url:amazon': 0.19; 'to:addr:python-list':
0.20; "i've": 0.22; 'to:name:python-list@python.org': 0.24;
'binary': 0.26; 'header:User-Agent:1': 0.30; 'module': 0.31;
'program': 0.32; 'python-list': 0.32; 'received:192.168.1': 0.32;
'received:google.com': 0.34; "didn't": 0.34;
'from:addr:gmail.com': 0.34; 'author': 0.37; 'received:192.168':
0.37; 'url-ip:151.101.0.223/32': 0.38; 'url-
ip:151.101.128.223/32': 0.38; 'url-ip:151.101.192.223/32': 0.38;
'url-ip:151.101.64.223/32': 0.38; 'list': 0.39; 'use': 0.39;
'text': 0.39; 'alan': 0.40; 'learn': 0.40; 'love': 0.62; 'follow':
0.62; 'site': 0.68; 'reply-to:addr:yahoo.co.uk': 0.69;
'transport': 0.69; 'url:author': 0.69; 'little': 0.73; 'features':
0.75; '....': 0.76; 'reply-to:no real name:2**0': 0.78; 'header
:Reply-To:1': 0.79; 'subject:UTF': 0.91; 'subject:mail': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1730411612; x=1731016412; darn=python.org;
h=content-transfer-encoding:to:reply-to:content-language:subject
:user-agent:mime-version:date:message-id:from:from:to:cc:subject
:date:message-id:reply-to;
bh=WN1mTuIdWcGC60d32cVnExb7LlRJOA0OEaBcHdjqiqc=;
b=l0jOAB/pBPetl1S5Am1hlQiaCKPSATNwuSduVniF5pXy3soIL69PXmLDRZregldh3P
WYNsA1BFtOTqXGDfMyQAXXyYte6q5M9/jvCD8lfQPx8Pd/iOjl8DyEFrlhqpd/iz8889
NPCfNEM5/e34EVaiPXzkHSGcSHNL03GIut3tOzrABzJJomvl+2EivO8rJuKIzBMLFH2V
HXmwsg/n/UOf9QdkbauyVNu584KWJ5jBzdT8tNISvsdV0M7mZRWgRYTGa3nTvIxP9WVK
DlVTxlqp88imfGKKSUiEsTUw1JT47Zmka4I5ZsqoTO5U+JTYomvB7dnIgYRRWSHLliPD
jugA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1730411612; x=1731016412;
h=content-transfer-encoding:to:reply-to:content-language:subject
:user-agent:mime-version:date:message-id:from:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=WN1mTuIdWcGC60d32cVnExb7LlRJOA0OEaBcHdjqiqc=;
b=pJ5gUUyybuv0gdF+VFCb7w90ju9c5dCPr1rLJGfejNDurFhFF5ZCoLPHLpz79nhJN8
waWV5ENTj30OJlGUhqg6U4sKPyC5lg9R0XgKfo/FCJ1mE9v+19kV3fqYKCicmtSMn0sR
Sy7zxHhe9PvAsvjk1Z7hQxJqcsBkGnFJvQQS4NT8/HzGu/Qf9Gjwfb8rfXxShIjrAhHg
qE5KmDieUEN3i3n6Yl6GfZD0Nwdm0mHcLN/bnfNBno0PwFNF6UMGcMQdykrYSV7pUlKZ
3hpfm3KetpZuDJKtpfpRVXBm4L+YQsWbtXqeDkSxYn4upu7tOfMafvjva3CJ/HkrM1iL
eISQ==
X-Gm-Message-State: AOJu0Yyd/Q3YaXU4EVcLP/NZMuTJPnW5FDrFhL+BNidGR4jyvQedb5I4
4fKOdivzBNWOquYT7VEcSOQJOfddhXUH/qnLSLJlBahXr0CgCjbD116Tg2sm
X-Google-Smtp-Source: AGHT+IHJnhsGPJmYN6ZJMuazzJY+UWke3l5woVPXILd6vtJxfg3jIbFcsBLtnijUIcItREgL7eJJEw==
X-Received: by 2002:adf:f1cd:0:b0:374:c8a0:5d05 with SMTP id
ffacd0b85a97d-3806121ff99mr14884397f8f.50.1730411611918;
Thu, 31 Oct 2024 14:53:31 -0700 (PDT)
X-Google-Original-From: Alan Gauld <alan.gauld@yahoo.co.uk>
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
View all headers

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.python.org/3/library/quopri.html

One of the things I love about this list are these little features
that I didn't know existed. Despite having used Python for over 25
years, I've never noticed that module before! :-)

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

Subject: Re: Printing UTF-8 mail to terminal
From: Gilmeh Serda
Newsgroups: comp.lang.python
Organization: Easynews - www.easynews.com
Date: Fri, 1 Nov 2024 20:18 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!nntp.comgw.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx06.ams4.POSTED!not-for-mail
From: gilmeh.serda@nothing.here.invalid (Gilmeh Serda)
Subject: Re: Printing UTF-8 mail to terminal
Newsgroups: comp.lang.python
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
<mailman.64.1730411614.4695.python-list@python.org>
MIME-Version: 1.0
x-no-archive: yes
User-Agent: Pan/0.161 (Chasiv Yar; df69451)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 26
Message-ID: <cIaVO.1746331$v0Jd.1554563@fx06.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Fri, 01 Nov 2024 20:18:16 GMT
X-Received-Bytes: 1709
View all headers

On Thu, 31 Oct 2024 21:53:31 +0000, Alan Gauld wrote:

> never noticed that module before!

"""
$ python
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...

AssemblyApp apparmor io pyzipper
AssemblyGui appdirs ipaddress qrtools
CAMSimulator application_utility isodate queue
Cheetah apprise isort quopri
[...]
"""

Put it in a list, unmangle it, sort it and you should have an alphabetical
list of all modules on your system.

--
Gilmeh

What the world *really* needs is a good Automatic Bicycle Sharpener.

Subject: Re: Printing UTF-8 mail to terminal (Posting On Python-List Prohibited)
From: Lawrence D'Oliv
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Fri, 1 Nov 2024 20:49 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python
Subject: Re: Printing UTF-8 mail to terminal (Posting On Python-List
Prohibited)
Date: Fri, 1 Nov 2024 20:49:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <vg3et6$3d77d$4@dont-email.me>
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
<mailman.64.1730411614.4695.python-list@python.org>
<cIaVO.1746331$v0Jd.1554563@fx06.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 01 Nov 2024 21:49:42 +0100 (CET)
Injection-Info: dont-email.me; posting-host="bd791c98b2a7ceb7baae313a68ac07cd";
logging-data="3579117"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BIAMN8v4NJFC6b2sy8zsb"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:Tp9XVRf/xApoaa9ahP1KtNQGfhs=
View all headers

On Fri, 01 Nov 2024 20:18:16 GMT, Gilmeh Serda wrote:

> Put it in a list, unmangle it, sort it and you should have an
> alphabetical list of all modules on your system.

For something easier to read, bookmark this page:
<https://docs.python.org/3/library/>

Subject: Re: Printing UTF-8 mail to terminal
From: Eli the Bearded
Newsgroups: comp.lang.python
Organization: Some absurd concept
Date: Fri, 1 Nov 2024 20:55 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.lang.python
Subject: Re: Printing UTF-8 mail to terminal
Date: Fri, 1 Nov 2024 20:55:20 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2411011655@qaz.wtf>
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk> <mailman.64.1730411614.4695.python-list@python.org> <cIaVO.1746331$v0Jd.1554563@fx06.ams4>
Injection-Date: Fri, 1 Nov 2024 20:55:20 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="11049"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
View all headers

In comp.lang.python, Gilmeh Serda <gilmeh.serda@nothing.here.invalid> 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...
>
> AssemblyApp apparmor io pyzipper
> AssemblyGui appdirs ipaddress qrtools
> CAMSimulator application_utility isodate queue
> Cheetah apprise isort quopri
> [...]
> """
>
> Put it in a list, unmangle it, sort it and you should have an alphabetical
> list of all modules on your system.

As someone who has done a lot of work with email in other languages,
"quopri" is not a name I'd expect or look for first pass for dealing
with MIME quoted-printable encoding. (Me, being me, I'd probably just
write it for myself if I didn't quickly find it while working with
email.)

Elijah
------
MIME: multipurpose Internet mail extensions

Subject: Re: Printing UTF-8 mail to terminal
From: Jon Ribbens
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Fri, 1 Nov 2024 21:05 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jon+usenet@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: Printing UTF-8 mail to terminal
Date: Fri, 1 Nov 2024 21:05:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <slrnviagli.5qt.jon+usenet@raven.unequivocal.eu>
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
<mailman.64.1730411614.4695.python-list@python.org>
<cIaVO.1746331$v0Jd.1554563@fx06.ams4> <eli$2411011655@qaz.wtf>
Injection-Date: Fri, 01 Nov 2024 22:05:54 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f219f957c518411a94a2206478f632cb";
logging-data="3569279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aWNBhQehQn6IuVjZzQv0xWIaXmJ4yDpQ="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:l55uhEQHEFBaSNrZ6QbqF36kNUE=
View all headers

On 2024-11-01, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.python, Gilmeh Serda <gilmeh.serda@nothing.here.invalid> 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...
>>
>> AssemblyApp apparmor io pyzipper
>> AssemblyGui appdirs ipaddress qrtools
>> CAMSimulator application_utility isodate queue
>> Cheetah apprise isort quopri
>> [...]
>> """
>>
>> Put it in a list, unmangle it, sort it and you should have an alphabetical
>> list of all modules on your system.
>
> As someone who has done a lot of work with email in other languages,
> "quopri" is not a name I'd expect or look for first pass for dealing
> with MIME quoted-printable encoding. (Me, being me, I'd probably just
> write it for myself if I didn't quickly find it while working with
> email.)

Python went through a period of time where lots of things just got stuck
in the standard library without any particula taxonomy. Hence ending up
with base64, binascii, binhex, quopri, and uu all being separate
top-level modules, only some of which got tidied up in Python 3.

Subject: Re: Printing UTF-8 mail to terminal (Posting On Python-List Prohibited)
From: Lawrence D'Oliv
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Sat, 2 Nov 2024 00:43 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python
Subject: Re: Printing UTF-8 mail to terminal (Posting On Python-List
Prohibited)
Date: Sat, 2 Nov 2024 00:43:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <vg3sjf$3ffdn$3@dont-email.me>
References: <9f754662-4b73-4d3d-a9b8-ac0a40762143@yahoo.co.uk>
<mailman.64.1730411614.4695.python-list@python.org>
<cIaVO.1746331$v0Jd.1554563@fx06.ams4> <eli$2411011655@qaz.wtf>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 02 Nov 2024 01:43:27 +0100 (CET)
Injection-Info: dont-email.me; posting-host="cda3a534871a9a8154ca2fc149b8d252";
logging-data="3653047"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KcFvnlaCNKC8iG6pSNaqX"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:YOtKtpuEyR5yID5Fixup9Z6GzEk=
View all headers

On Fri, 1 Nov 2024 20:55:20 -0000 (UTC), Eli the Bearded wrote:

> As someone who has done a lot of work with email in other languages,
> "quopri" is not a name I'd expect or look for first pass for dealing
> with MIME quoted-printable encoding.

<https://docs.python.org/3/search.html?q=quoted+printable>

1

rocksolid light 0.9.8
clearnet tor