Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
When writing to a file, how do you tell python to format the text and enter to the next line?

-Thanks

I don't know what you mean by "format the text".

Newlines are different for linux/mac vs. windows/dos

For *nix systems, including Mac
Code:
print("This is on the first line \n and this is on the second.")

For Windows/DOS machines
Code:
print("This is on the first line \r\n and this is on the second.")
 
You can also add the newline character (\n) to the end of your line.
For instance:

writeline("Hello.\n")

will result in a new line at the \n point.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.