import Blender

texts=Blender.Text.Get()

for text in texts:
	out=file(text.name, 'w')
	for line in text.asLines():
		out.write(line+'\n')

