Skip to content
Snippets Groups Projects
Commit 8651349a authored by Pranav Kilambi's avatar Pranav Kilambi
Browse files

Replace html_writer.py

parent a47b7c34
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ def read_csv(filename):
with open(filename) as csvfile:
### EDIT BELOW HERE ###
reader = csv.reader(csvfile, delimiter=";")
for row in reader:
result.append(row);
pass
### EDIT ABOVE HERE ###
......@@ -38,7 +40,9 @@ def csv_to_html(csvdata):
"""
htmlstring = ""
### EDIT BELOW HERE ###
htmlline = "<tr><td>{}</td><td>{}</td><td>{}</td></tr>\n"
for i in range(0,len(csvdata)):
htmlline = "<tr><td>{}</td><td>{}</td><td>{}</td></tr>\n".format(csvdata[i][0],csvdata[i][1],csvdata[i][2])
htmlstring = htmlstring + htmlline
pass
### EDIT ABOVE HERE ###
......@@ -51,7 +55,10 @@ def combine_template_with_data(template_string, htmldata):
tabular data.
"""
### EDIT BELOW HERE ###
return ""
fullhtml = template_string.format(htmldata);
return fullhtml
### EDIT ABOVE HERE ###
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment