Replace \n with <br />
thatLine = thatLine.replace('\n', '<br />')
str.replace() returns a copy of the string, it doesn't modify the string you pass in.
Just for kicks, you could also do
mytext = "<br />".join(mytext.split("\n"))
to replace all newlines in a string with <br />
.