##// END OF EJS Templates
Fix the py2exe template path problem (issue:152) again....
Shun-ichi GOTO -
r1955:2f500a4b default
parent child Browse files
Show More
@@ -8,7 +8,7 b''
8 import re
8 import re
9 from demandload import demandload
9 from demandload import demandload
10 from i18n import gettext as _
10 from i18n import gettext as _
11 demandload(globals(), "cStringIO cgi os time urllib util")
11 demandload(globals(), "cStringIO cgi sys os time urllib util")
12
12
13 esctable = {
13 esctable = {
14 '\\': '\\',
14 '\\': '\\',
@@ -235,3 +235,7 b' def templatepath(name=None):'
235 p = os.path.join(os.path.dirname(__file__), *fl)
235 p = os.path.join(os.path.dirname(__file__), *fl)
236 if (name and os.path.exists(p)) or os.path.isdir(p):
236 if (name and os.path.exists(p)) or os.path.isdir(p):
237 return os.path.normpath(p)
237 return os.path.normpath(p)
238 else:
239 # executable version (py2exe) doesn't support __file__
240 if hasattr(sys, 'frozen'):
241 return os.path.join(sys.prefix, "templates")
General Comments 0
You need to be logged in to leave comments. Login now