Good afternoon
I'm quite new to Python and I am trying to get the result of a script to show into a html tag - so within my app.py I have the following code;
I'm quite new to Python and I am trying to get the result of a script to show into a html tag - so within my app.py I have the following code;
file = open("blocks.txt", "r") line_count = 0 for line in file: if line != "\n": line_count += 1 file.close() print(line_count)Then within my index.html I put this;
<b>IP's Blocked: <label>{{line_count}}</label></b>As you can imagine, this mustn't be right. How can I get it to work ?