Re: Programming question

2008-06-11 Thread Terry Reedy
"Brad Navarro" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Basically, what I am trying to do is get a list of each file's attributes within a directory. Basically, the information that the 'ls -l' command would give you in a linux shell, except the results for each file in the dir

Re: Programming question

2008-06-11 Thread Python Nutter
2008/6/12 Brad Navarro <[EMAIL PROTECTED]>: > Basically, what I am trying to do is get a list of each file's attributes > within a directory. Basically, the information that the 'ls –l' command Python For System Administrators: http://www.ibm.com/developerworks/aix/library/au-python/ handy to a

Re: Programming question

2008-06-11 Thread Jeff McNeil
Have a look at os.listdir and os.stat. I've never worked with 1.5, so I don't know what will work with it and what won't,. but I'd imagine the following ought to be fine, though. stat_list = [] for dirent in os.listdir('your_directory'): stat_list.append(os.stat(dirent)) Jeff On Wed, Jun