Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
530 B
5
Indexable
Never
from imp import reload
from os import listdir
from os import remove
from os.path import isfile, join

currentFile = __file__.replace('\\','/')
folder = currentFile.split(currentFile.split('/')[-1])[0]

all_files = [f for f in listdir(folder) if isfile(join(folder, f)) ]
py_files = [f for f in all_files if not '.pyc' in f]
__all__ = [f.split('.')[0] for f in py_files if not '__init__' in f]

from . import *

for script in __all__:
    print ('reload {0}'.format(script))
    reload('modules.{0}'.format(script))