so now we can load modules dynamically. Also, the tutorials for python seem insane. Why was this simple answer not the first to pop. Ugh.

This commit is contained in:
cktricky
2018-04-12 23:58:20 -04:00
parent f59e8b9f4f
commit 78916326b9
4 changed files with 8 additions and 16 deletions

View File

@@ -1,12 +1,9 @@
import os
from libs.utils.common import *
# Get the application's path (wherever weirdAAL.py is located will be the dirpath )
dirpath = os.getcwd()
# The actual location of this file on the filesystem is the "foldername"
foldername = os.path.dirname(os.path.realpath(__file__))
all_files = list_all_files(foldername)
__all__ = all_files
all_modules = list_all_files(foldername)