-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
27 lines (21 loc) · 777 Bytes
/
Main.py
File metadata and controls
27 lines (21 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Finish the directory listing for the Test scripts Directory listing. It has an error for not displaying the
# content of that folder
# ScriptCo Script Manager to organize scripts for testing purposes.
import os
def get_files_dict(directory_path):
files_dict = {}
i = 0
for item in os.listdir(directory_path):
item_path = os.path.join(directory_path, item)
if os.path.isfile(item_path):
i += 1
files_dict[item] = (i , item_path)
return files_dict
def main():
print('Welcome to ScriptCo Script Manager')
directory =os.path.expanduser('~\PycharmProjects\PythonScripts\TestScripts')
folders = get_files_dict(directory)
for i in folders:
print(f"{folders}")
if __name__ == '__main__':
main()