equal
deleted
inserted
replaced
18 def templatepath(): |
18 def templatepath(): |
19 for f in "templates", "../templates": |
19 for f in "templates", "../templates": |
20 p = os.path.join(os.path.dirname(__file__), f) |
20 p = os.path.join(os.path.dirname(__file__), f) |
21 if os.path.isdir(p): |
21 if os.path.isdir(p): |
22 return os.path.normpath(p) |
22 return os.path.normpath(p) |
|
23 else: |
|
24 # executable version (py2exe) doesn't support __file__ |
|
25 if hasattr(sys, 'frozen'): |
|
26 return os.path.join(sys.prefix, "templates") |
23 |
27 |
24 def age(x): |
28 def age(x): |
25 def plural(t, c): |
29 def plural(t, c): |
26 if c == 1: |
30 if c == 1: |
27 return t |
31 return t |