2010-07-27 20:35:01 -05:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import glob
|
|
|
|
import re
|
|
|
|
|
|
|
|
files = glob.glob(os.path.dirname(__file__)+"/*.py")
|
|
|
|
__all__ = []
|
|
|
|
|
|
|
|
initre = re.compile('__init__')
|
|
|
|
|
|
|
|
for i in files:
|
|
|
|
if initre.search(i):
|
|
|
|
continue
|
2010-07-28 13:25:49 -05:00
|
|
|
|
2010-07-27 20:35:01 -05:00
|
|
|
i = os.path.basename(i)
|
|
|
|
lastDot = i.rfind(".")
|
|
|
|
i = i[0:lastDot]
|
|
|
|
__all__.append(i)
|
2010-07-28 00:11:58 -05:00
|
|
|
# This line is essentially: from i import *
|
2010-07-27 20:35:01 -05:00
|
|
|
__import__(i, locals(), globals(), ["*"])
|
|
|
|
|
|
|
|
__all__ = list(set(__all__))
|
2010-07-28 00:11:58 -05:00
|
|
|
|
2010-07-28 23:48:47 -05:00
|
|
|
# vi:tabstop=4:expandtab:autoindent
|
2010-07-28 00:11:58 -05:00
|
|
|
# kate: indent-mode python;indent-width 4;replace-tabs on;
|