473,573 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Programming question

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('you r_directory'):
stat_list.appen d(os.stat(diren t))


On Wed, Jun 11, 2008 at 2:33 PM, Brad Navarro <br**********@w ni.comwrote:

Being extremely new to Python, I haven't got the experience to figure this
one out on my own and frankly I am not sure I would know where to look.

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
directory are stored as a list.

I am presently using version 1.5 on a linux machine. I have kindly requested
my system administrator to upgrade to 2.5.2, but until then I am afraid Iam
stuck with 1.5.



Jun 27 '08 #1
0 1012

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: rdsteph | last post by:
I am having a lot of fun using the pyGoogle module ( http://pygoogle.sourceforge.net/ ) that uses the Google API. It is about as easy to use as I can imagine, and it is a lot nicer than using my old HTMl screen scraping habits. My online CGI program Ask Merlin at www.awaretek.com/askmerlin.html is an example. Currently, the program takes...
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now I really want to get back into it as I see a point with GNU/Linux. I want to get my old skills back and write something or help on some projects...
by: Rohit | last post by:
I need some ideas on how to write a program that could -- Read an MS Access database and grab information say Vehicle year, vehicle make -- Make a call to a website and enter the information grabbed earlier -- Get the Auto premium quote -- Store the results on the MS Access database / table. The Websites that quote premium on web like...
by: user | last post by:
Hi all, At the outset, I regret having to post this slightly OT post here. However, I strongly feel that people in this group would be the best to advise me on my predicament. I am working as a QA in an MNC in India, since I graduated in September 2003. I am working in a QA role which requires me to do some Winrunner automation, and...
by: Jesse B. | last post by:
I've been learning how to program with C, and I can't find any info about GUI programming with C. I'm almost done with O'reilly's Practical programming with C, and would like to mess around with GUI programming with C. I understand that it's easier to move to C++ or a few other languages (namely GTK+ or QT), but I'd like to stick with just C...
by: Ed_P | last post by:
Hello I just wanted to get the opinions of those of you who have experience developing C# applications and programming in general. I currently am learning the basics of programming (choosing C# as the language of choice) and have developed simple applications to work with Access/SQL databases. I have accomplished all tasks that I wanted to...
by: tjones | last post by:
Hi, I am guessing this is *THE* nntp newsgroup for C#? I was hoping someone could point me in the right direction. Id like to find employment in the IT industry as a programmer again. My background is a mix of programming and networking. I have fairly decent skills in C++, Java and ADA. I have been working as a network engineer on all...
by: Kevin Spencer | last post by:
Is it just me, or am I really observing a trend away from analysis and probem-solving amongst programmers? Let me be more specific: It seems that every day, in greater numbers, people are coming to these programming newsgroups and asking for ready-made solutions to fairly simple programming problems. They either want someone to write code...
by: arnuld | last post by:
hello all, 1st of all, i searched last 12 years archives of comp.lang.c++ because i have some problems. i got some help but not satisfied as i did not get solution specific to my problem. In the end, searching archives is a boring & very time-comsuming task BUT it really helps. actually i have posted this question onto some other newsgroup...
by: Dexter | last post by:
My site is home to series of quizzes ranging from Accounting, Business, Math to programming languages. These are multiple choice type questions and you get a score card at end. For C language, I have 3 set of quizzes that anyone is welcome to try online for free. Questions on C quizzes are rather easy to solve for Professional C...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.