PageRenderTime 20ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/langs/__init__.py

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