/src/langs/__init__.py
http://pyaimt.googlecode.com/ · Python · 14 lines · 10 code · 2 blank · 2 comment · 5 complexity · 79ae2afc299151fd12af792aaa0f4935 MD5 · raw file
- # Copyright 2005-2006 Daniel Henninger <jadestorm@nc.rr.com>
- # Licensed for distribution under the GPL version 2, check COPYING for details
- import os
- files=os.listdir("src/langs")
- for i in range(len(files)):
- if files[i] == "__init__.py": continue
- if files[i].endswith(".py"):
- files[i] = files[i].replace(".py","")
- try:
- exec("from %s import *" % files[i])
- except UnicodeDecodeError:
- print "Unable to import language %s.\n" % files[i]