[Tutor] IDLE shell indentation?

boB Stepp robertvstepp at gmail.com
Fri Oct 19 04:11:53 CEST 2012


>>> if zero:
	print(zero)
else:
	print(phrase)

	
Wild Swans by Jung Chang
>>>

Is there some special way for typing in multiline blocks of code into
the shell in IDLE? The above works, but it bothers me that "else" does
not line up with "if". Also, in the IDLE shell the "p" in "print"
actually lines up under the "e" in "zero". However when I copied from
IDLE and pasted into gmail, this alignment was changed. I am guessing
it is because gmail is not using a fixed-width font. And I have yet to
figure out how to get it to use one when in plaintext mode.

Thanks!
boB


More information about the Tutor mailing list