I’m writing this to a text file which is then read in by my browser. How do I assign the variable “i[0]” to the to the “submit” button so it is passed to my edit_python script?
k.write('<table>')
for i in row:
k.write('<tr>')
k.write('<td><form action="edit_python" method="post" name="edit_python"><input type="submit" value="Submit" /><></FORM></td><td>'+i[0]+'</td><td>'+i[1]+'</td>')
k.write('</tr>')
k.write('</table>')
Put it in a hidden input element. In this case, it will be assigned to the ivalue post request variable.
I cleaned up your HTML a bit too, what was this about before the end form tag?
If you want a literal
<>in your page, use<>. Also, the case of the tags should match for HTML, and should be lowercase for XHTML (which you appear to be using).EDIT:
Also, you do realise the browser won’t interpret Python? You need a web server set up correctly to do that.