I keep getting the error:
Traceback (most recent call last):
File "E:/Documents and Settings/Lidia/Desktop/Code/unidisp2.py", line 3, in <module>
form = cgi.FieldStorag e()
AttributeError: 'module' object has no attribute 'FieldStorage'
My code is:
can anyone help with this?
Traceback (most recent call last):
File "E:/Documents and Settings/Lidia/Desktop/Code/unidisp2.py", line 3, in <module>
form = cgi.FieldStorag e()
AttributeError: 'module' object has no attribute 'FieldStorage'
My code is:
Code:
import cgi
import unicodedata
form = cgi.FieldStorage()
Start = int(form["Start"].value)
End = int(form["End"].value)
print "Content-Type: text/html"
print"""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Unicode Characters</title>
</head>
<body>
<h1>Unicode Characters</h1>
<table class="characters">
<caption>Defined Unicode characters 165–172</caption>
<thead>
<tr><th scope="col" abbr="num">Number</th><th scope="col" abbr="entity">HTML Entity</th><th scope="col" abbr="char">Character</th><th scope="col" abbr="name">Name</th></tr>
</thead>
<tbody>"""
for char in range(start,end+1):
name = unicodedata.name(unichr(char), "undefined")
print "<tr><td class=\"num\">" + str(char) + "</td>"
print "<td><code class=\"html\">&#" + str(char) + ";</code>"
print "</td><td class=\"char\"><span>&#" + str(char) + ";</span></td>"
print "<td class=\"name\">" + name + "</td></tr>"
print "</tbody></table>"
print "</body></html>"
Comment