CoCalc Shared Fileswww / cgi-bin / mfd / mfe_slopes.pyOpen in CoCalc with one click!
Author: William A. Stein
1
#!/usr/bin/python
2
3
import cgi, mfd, sys
4
5
form = cgi.FieldStorage()
6
7
print "Content-Type: text/html"
8
print ""
9
10
if form.has_key("code"):
11
code = form["code"].value
12
else:
13
print "Missing code"
14
sys.exit(0)
15
16
if form.has_key("prime"):
17
prime = int(form["prime"].value)
18
else:
19
print "Missing prime"
20
sys.exit(0)
21
22
23
M = mfd.ModSym(code)
24
slopes = M.slopes(prime)
25
print "// Slopes of T_%s on %s<br>"%(prime,code)
26
print "slopes := %s;\n"%slopes
27
28