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

Function main

recipes/Python/578184_Page_Counter/recipe-578184.py:4–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import Zcgi
3
4def main():
5 try:
6 count = cPickle.load(file('count.txt'))
7 except:
8 count = 0
9 count += 1
10 cPickle.dump(count, file('count.txt', 'w'))
11 Zcgi.print_plain(str(count))
12
13if __name__ == '__main__':
14 Zcgi.execute(main, 'cgi')

Callers

nothing calls this directly

Calls 3

strFunction · 0.85
loadMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected