[Tutor] Error in apparently correct code

eryksun eryksun at gmail.com
Tue Aug 21 12:25:51 CEST 2012


On Mon, Aug 20, 2012 at 11:21 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>
> Indentation has meaning in Python. When you send email, if your email
> program (possibly GMail?) mangles the indentation, your code will become
> invalid, unreadable mess. You need to fix this. Often the easiest way to fix
> this is to *not* post so-called "rich text", actually HTML. Most mail
> programs will leave plain text emails alone, but if you send HTML, they will
> mangle *both* the text and the HTML.

Gmail's editor for plain text will hard wrap *some* lines at about 69
characters, but not rigidly (it seems to leave code untouched).
There's no live preview (the textarea wraps at the window width). You
just click "Send" and hope it doesn't mangle your formatting.

Also, the interface displays plain text mail with a proportional font.
Depending on your browser you can hack the CSS to use a monospace
font. I use Stylish in Firefox:

http://userstyles.org/styles/15618/gmail-monospace-font-for-body-messages-textarea


More information about the Tutor mailing list