Created
July 16, 2012 17:29
-
-
Save reorx/3123908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def getflist(path): | |
fl = {} | |
for f in os.listdir(path): | |
fullname = os.path.join(path, f) | |
if not os.path.isfile(fullname): | |
continue | |
fl[f] = (os.path.getmtime(fullname), | |
int(os.path.getsize(fullname) / 1024)) | |
return fl | |
if __name__ == '__main__': | |
print getflist(os.getcwd()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment