looks legit to me (trying to make sure we can load all files in the modules directory as well as libs but do it in a somewhat abstracted way. Although, the method to do the abstraction then requires duplicate code so I am sort of annoyed that I used dup code to avoid making dup code... whatever... get over it you neurotic ginger.)

This commit is contained in:
cktricky
2018-04-06 00:00:01 -10:00
parent 3b60996fdc
commit 7ff5319252
6 changed files with 36 additions and 11 deletions

12
libs/utils/common.py Normal file
View File

@@ -0,0 +1,12 @@
import os
def list_all_files(directory):
list_of_files = os.listdir(directory)
array = []
for file in list_of_files:
filename_and_ext = os.path.splitext(file)
if filename_and_ext[1] == ".py":
array.append(filename_and_ext[0])
return array