- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
Latest commit
27 lines (21 loc) · 777 Bytes
/
Copy pathMain.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.
importos
defget_files_dict(directory_path):
files_dict= {}
i=0
foriteminos.listdir(directory_path):
item_path=os.path.join(directory_path, item)
ifos.path.isfile(item_path):
i+=1
files_dict[item] = (i , item_path)
returnfiles_dict
defmain():
print('Welcome to ScriptCo Script Manager')
directory=os.path.expanduser('~\PycharmProjects\PythonScripts\TestScripts')
folders=get_files_dict(directory)
foriinfolders:
print(f"{folders}")
if__name__=='__main__':
main()