2012-05-11 22:05:41 +00:00
|
|
|
from .GLViewWidget import GLViewWidget
|
2012-03-06 06:22:02 +00:00
|
|
|
|
|
|
|
import os
|
|
|
|
def importAll(path):
|
|
|
|
d = os.path.join(os.path.split(__file__)[0], path)
|
|
|
|
files = []
|
|
|
|
for f in os.listdir(d):
|
2012-05-11 22:05:41 +00:00
|
|
|
if os.path.isdir(os.path.join(d, f)) and f != '__pycache__':
|
2012-03-06 06:22:02 +00:00
|
|
|
files.append(f)
|
|
|
|
elif f[-3:] == '.py' and f != '__init__.py':
|
|
|
|
files.append(f[:-3])
|
|
|
|
|
|
|
|
for modName in files:
|
|
|
|
mod = __import__(path+"."+modName, globals(), locals(), fromlist=['*'])
|
|
|
|
if hasattr(mod, '__all__'):
|
|
|
|
names = mod.__all__
|
|
|
|
else:
|
|
|
|
names = [n for n in dir(mod) if n[0] != '_']
|
|
|
|
for k in names:
|
|
|
|
if hasattr(mod, k):
|
|
|
|
globals()[k] = getattr(mod, k)
|
|
|
|
|
|
|
|
importAll('items')
|