]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - www/ipfire.py
Change Color of Menuitem CeBIT.
[people/shoehn/ipfire.org.git] / www / ipfire.py
1 #!/usr/bin/python
2
3 import cgitb
4 cgitb.enable()
5
6 import sys
7 import cgi
8 import imputil
9
10 site = cgi.FieldStorage().getfirst("site") or "index"
11
12 sys.path = [ "pages",] + sys.path
13 for s in (site, "static"):
14 try:
15 found = imputil.imp.find_module(s)
16 loaded = imputil.imp.load_module(s, found[0], found[1], found[2])
17
18 p = loaded.__dict__["page"]
19
20 break
21 except ImportError, e:
22 pass
23
24 p()