MCPcopy Create free account
hub / github.com/ActiveState/code / main

Function main

recipes/Python/577524_Python_Sessions/recipe-577524.py:305–325  ·  view source on GitHub ↗

Tester Program

()

Source from the content-addressed store, hash-verified

303 print "</dl>"
304
305def main():
306 """Tester Program"""
307
308 start() # session.start()
309 if SESSION.isset("views"):
310 SESSION["views"] += 1
311 else:
312 SESSION["views"] = 1
313
314 print "Content-type: text/html"
315 print SESSION.output()
316 print
317
318 print "<html><head><title>Session Testing</title></head><body>"
319 print "<h2>You have viewed this page %i times.</h2>"%SESSION["views"]
320 print_session(SESSION)
321 print "<p>", SESSION.path, "</p>"
322 for line in DEBUG:
323 print "<p>%s</p>"%line
324 print "<p>%s</p>"%SESSION.data
325 print "</body></html>"
326
327if __name__ == "__main__":
328 main()

Callers 1

recipe-577524.pyFile · 0.70

Calls 4

print_sessionFunction · 0.85
startFunction · 0.70
issetMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected