Filehandling/processing in Python

Thomas Weholt thomas at bibsyst.no
Mon Oct 11 04:13:24 EDT 1999


Hi,

I`ve asked similar questions earlier, but bear with me.

It seems like file-handling, ie. more than reading lines in a plain-text
file, is done by 3rd-party modules in Python. I`ve looked into
os.stat-module, but I`d like know what methods/functions are available,
and most importantly, how to handle the returned values. Isn`t there
somebody who has worked on this earlier, like made a ls/dir-like command
that lists out files and modification time, size, type ( file or dir
) etc?

Most of my scripts dive into folders and process them recursively, so
this is rather important to me, but my Python books ( Learning Python,
Programming Python and Internet Programming with Python ) don`t seem to
go beyond the old input.readline() stuff.

Any tips on how or where or whatever to do from here ( related to
file-handling that is, not in a universal, metaphysical sense ) would be
appreciated.

Thomas Weholt





More information about the Python-list mailing list