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

@@ -7,6 +7,6 @@ def list_all_files(directory):
for file in list_of_files:
filename_and_ext = os.path.splitext(file)
if filename_and_ext[1] == ".py":
if (filename_and_ext[1] == ".py") and not (filename_and_ext[0].startswith("__")):
array.append(filename_and_ext[0])
return array