I have a text file that I want to read in my cgi script that will appear with a new line in between each line but it is just coming up as one huge wall of text. I cant figure out where to put '\n'. I have tried multiple locations but none work. Here is my code.
cgitb.enable()
form = cgi.FieldStorage()
keyword = form.getvalue('keyword')
f = open('%s.txt' %keyword, 'r')
print 'Content-type: text/html\r\n\r'
print '<html>'
print '<title> keyword + "tweets" </title>'
print f.readlines()
print '</html>'
f.close()
keyword='/home/username/Desktop/file.txt? Or is this some internal script?