#! /usr/local/bin/python3 import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Send'))
#!/usr/local/bin/python3 import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data_test.py', ['TimeValue'], text='Send'))
import yate, cgi import athletemodel form = cgi.FieldStorage() the_id = form['which_athlete'].value # the_athletes_name=athletemodel. print(yate.start_response()) print(yate.include_header("Add a timing data")) print( yate.do_form('add_timing_data.py', the_inputs=[[the_id], ['TimeValue']], method='post', text='Send'))
# -*- coding:utf-8 -*- import yate print(yate.start_response()) print(yate.do_form("add_timing_data.py", ['TimeValue'], text="Send"))
#1 /usr/local/bin/python3 import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Send')) # dynamically create the form, supplying any arguments as required
import yate import cgitb # 打开调试 cgitb.enable() # 输出 print(yate.start_response()) print(yate.do_form("/cgi-bin/add_timing_data.py", ['TimeValue'], text = 'Send'))
#! /usr/local/bin/python3 import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data.py', ['TimeValue'], text="Send"))
#! /usr/local/bin/python3 import yate import cgi import os form = cgi.FieldStorage() athlete_id = form.getvalue('AthleteId') print(yate.start_response('text/html')) # 打印所有环境变量,参考http://www.runoob.com/python/python-cgi.html # for key in os.environ.keys(): # print(yate.para(key + "=" + os.environ[key])) print( yate.do_form('add_timing_data.py?AthleteId=' + str(athlete_id), ['Time'], text='Send'))
#!/usr/bin/env python import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Submit'))
import yate import cgitb cgitb.enable() print(yate.start_response("text/html")) print(yate.include_header("Coach Kelly's List of Athletes")) print(yate.do_form("add_timing_data.py", ['TimeValue'], submit_txt='Send')) print(yate.include_footer({"HOME": "/index.html"}))
import yate print(yate.start_response("text/html")) print(yate.do_form("add_timing_data.py", {"TimeValue": "80"}, text="Send"))
import cgi import yate import cgitb cgitb.enable() print(yate.start_response("text/html")) print(yate.do_form("add_timing_data.py",["TimeValue"],text="Send"))
#! /usr/bin/env python import yate print yate.start_response() print yate.do_form('add_timing_data.py', ['TimeValue'], text='Send')
#! /usr/bin/env python import cgitb cgitb.enable() import cgi import yate import athletemodel form_data = cgi.FieldStorage() if "which_athlete" not in form_data: print "<H1>Error</H1>" print "Please choose one athlete." athlete_id = form_data["which_athlete"].value athlete = athletemodel.get_athlete_from_id(athlete_id) print yate.start_response() print yate.include_header("Coach Kelly's Timing Data") print yate.header("Athlete:" + athlete['name'] + ", DOB:" + athlete['dob'] + ".") print yate.para("The top times for " + athlete['name'] + " are:") print yate.u_list(athlete['top3']) print yate.para("The entire set of timing data is: " + str([float(item) for item in athlete['data']]) + " (duplicates removed).") print yate.do_form("add_timing_data.py", [athlete_id], "post", "Add a new time"); print yate.include_footer({"Home":"../index.html", "Select another athlete":"generate_list.py"})
#! /usr/bin/python3 #import cgitb #cgitb.enable() import yate print(yate.start_response('text/html')) print(yate.do_form('add_timing_data.py', ['Athlete_id', 'Time'], text="Send"))