urgent

Michael F. Stemper michael.stemper at gmail.com
Thu Sep 2 10:56:38 EDT 2021


On 31/08/2021 18.02, Barry wrote:

> The big problem with >>> is that it means a third level quote in email clients.
> So when people cut-n-paste REPL output it’s formatted badly by email clients.
> A prompt that avoided that issue would be nice.

A little bit of piping fixes that:

username at hostname$ cat text
username at hostname$ python3
Python 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys  # in the original, this line will be messed up
 >>> sys.exit(0) # this one, too
username at hostname$ sed 's/^>>> /REPL> /' < text
username at hostname$ python3
Python 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
REPL> import sys  # in the original, this line will be messed up
REPL> sys.exit(0) # this one, too
username at hostname$


-- 
Michael F. Stemper
What happens if you play John Cage's "4'33" at a slower tempo?


More information about the Python-list mailing list