Skip to content
Newer
Older
100644 63 lines (49 sloc) 1.28 KB
089a01a web.py 0.2
aaronsw authored
1 #!/usr/bin/env python
20205cf move up __future__ import for compatibility. tx Alberto Bertogli
aaronsw authored
2 from __future__ import generators
3
089a01a web.py 0.2
aaronsw authored
4 """web.py: makes web apps (http://webpy.org)"""
dc06d89 @anandology changed version to 0.23
anandology authored
5 __version__ = "0.23"
6298b30 set svn:keywords property to automatially replace $Rev$.
anand authored
6 __revision__ = "$Rev$"
089a01a web.py 0.2
aaronsw authored
7 __author__ = "Aaron Swartz <me@aaronsw.com>"
8 __license__ = "public domain"
9 __contributors__ = "see http://webpy.org/changes"
10
11 # todo:
12 # - some sort of accounts system
13
4249032 move errors into web.py instead of the server; fix bug with ors in te…
aaronsw authored
14 import utils, db, net, wsgi, http, webapi, request, httpserver, debugerror
cbb981e integrate template better, move in form
aaronsw authored
15 import template, form
55adf3a integrate template
aaronsw authored
16
089a01a web.py 0.2
aaronsw authored
17 from utils import *
18 from db import *
19 from net import *
6974b25 oops, forgot to import wsgi
aaronsw authored
20 from wsgi import *
17f16d1 correct placement of wsgi
aaronsw authored
21 from http import *
089a01a web.py 0.2
aaronsw authored
22 from webapi import *
23 from request import *
d700e16 get rid of the old web.py
aaronsw authored
24 from httpserver import *
4249032 move errors into web.py instead of the server; fix bug with ors in te…
aaronsw authored
25 from debugerror import *
089a01a web.py 0.2
aaronsw authored
26
27 try:
55adf3a integrate template
aaronsw authored
28 import cheetah
089a01a web.py 0.2
aaronsw authored
29 from cheetah import *
30 except ImportError:
31 pass
32
33 def main():
34 import doctest
35
36 doctest.testmod(utils)
37 doctest.testmod(db)
38 doctest.testmod(net)
6974b25 oops, forgot to import wsgi
aaronsw authored
39 doctest.testmod(wsgi)
17f16d1 correct placement of wsgi
aaronsw authored
40 doctest.testmod(http)
089a01a web.py 0.2
aaronsw authored
41 doctest.testmod(webapi)
42 doctest.testmod(request)
43
44 try:
45 doctest.testmod(cheetah)
55adf3a integrate template
aaronsw authored
46 except NameError:
eb13caa cheetah test goof caught by paulc
aaronsw authored
47 pass
089a01a web.py 0.2
aaronsw authored
48
14abe3e clean up template.py, add unit tests
aaronsw authored
49 template.test()
50
089a01a web.py 0.2
aaronsw authored
51 import sys
52 urls = ('/web.py', 'source')
53 class source:
54 def GET(self):
55 header('Content-Type', 'text/python')
56 print open(sys.argv[0]).read()
57
58 if listget(sys.argv, 1) != 'test':
59 run(urls, locals())
60
60aa853 cheetah test goof caught by paulc
aaronsw authored
61 if __name__ == "__main__": main()
0b56731 dummy change to update revision
anand authored
62
Something went wrong with that request. Please try again.