Just had to paste some code into blender and thought of a much nicer way to do it. Should work on most terminals, only tested on Windows.
Make sure you have the default text window Text and another called Paste. In Text enter the following:
import Blender from Blender import Text t = Text.Get('Paste') s = raw_input() while s != 'END': t.write(s + ' ') s = raw_input()
Do Alt+P to run and blender will stop working while you paste text into the console. Press Enter, type END and press Enter again. Return to Blender and it’s there in Paste.
Note: If your text contains the word END on its own on a line… i’m sure you can see where this would cause problems. Edit as needed.