1. 修复qq频道发不了图片的问题
This commit is contained in:
+7
-3
@@ -12,11 +12,15 @@ def get_classes(p_name, arg):
|
||||
break
|
||||
return classes
|
||||
|
||||
# 获取一个文件夹下所有的模块
|
||||
# 获取一个文件夹下所有的模块, 文件名和文件夹名相同
|
||||
def get_modules(path):
|
||||
modules = []
|
||||
for root, dirs, files in os.walk(path):
|
||||
# 获得所在目录名
|
||||
p_name = os.path.basename(root)
|
||||
print(p_name)
|
||||
for file in files:
|
||||
if file.endswith(".py") and not file.startswith("__"):
|
||||
if file.endswith(".py") and not file.startswith("__") and p_name.lower() == file[:-3].lower():
|
||||
modules.append(file[:-3])
|
||||
return modules
|
||||
return modules
|
||||
|
||||
Reference in New Issue
Block a user