I am writing a function that is recieving a folder path as an arguemnt. I want her to add into a dictionary what's inside the folder (like dir in CMD)
How can I do this ?
Thank you in advance, Iliya
I am writing a function that is recieving a folder path as an arguemnt. I want her to add into a dictionary what's inside the folder (like dir in CMD)
How can I do this ?
Thank you in advance, Iliya
import os
print os.listdir('/tmp')
Similar Topics:
Also, I use os.path and glob a lot while manipulating file system path. You might want to check it out.