Pulling my hair out here... have been playing around with this for the last hour but I cannot get it to do what I want, ie. remove the newline sequence.
def add_quotes( fpath ):
ifile = open( fpath, 'r' )
ofile = open( 'ofile.txt', 'w' )
for line in ifile:
if line == '\n':
ofile.write( "\n\n" )
elif len( line ) > 1:
line.rstrip('\n')
convertedline = "\"" + line + "\", "
ofile.write( convertedline )
ifile.close()
ofile.close()