Author: gh
Date: 2006-10-03 10:42:24 -0600 (Tue, 03 Oct 2006)
New Revision: 1972
Modified:
FormEncode/branches/gettext-enabled/formencode/api.py
Log:
__file__ changed to pkg_resources
Modified: FormEncode/branches/gettext-enabled/formencode/api.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03
15:24:57 UTC (rev 1971)
+++ FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03
16:42:24 UTC (rev 1972)
@@ -6,7 +6,7 @@
import textwrap
import re
import os
-import formencode
+from pkg_resources import resource_filename
__all__ = ['NoDefault', 'Invalid', 'Validator', 'Identity',
'FancyValidator', 'is_validator']
@@ -14,7 +14,7 @@
import gettext
def get_localedir():
- return "%s%s%s" % (os.path.dirname(formencode.__file__), os.path.sep,
"i18n")
+ return resource_filename(__name__, "/i18n")
def set_stdtranslation(domain="FormEncode", languages=None, \
localedir = get_localedir()):
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs