[Tutor] newbie questions
Tue, 21 Nov 2000 15:59:39 -0800
I am familiar with some scripting languages and have done some programming
in the past (not in C++ or at the systems level). Python has come to my
attention and has been highly endorsed by other professionals whom I
respect. Although I am determined to give the effort it takes to learn
Python, however, I'm having trouble doing some simple things;
My initial goal; to be able to specify a Windows directory (and all
directories beneath it) and have file listings returned as a text file based
on modification date(s) that a user specifies.
It doesn't seem that hard, but thusfar, I'm only able to get os.path to
work, and listdir(pathInaVarName)to work. I have Mark Hammond's Win32api's
installed, and it seems like I need to be using something called PyIDLobject
that a returns GetFileAttributes()function, but I'm not sure if there's an
easy way to do what I want.
In theory, I should be able to assign a path to a variable, assign a date to
another variable, create a loop that compares the file modification time to
the date in the variable, write the name and path of a file that matches the
date to a text file, increment the loop, and walk the directory tree to the
bottom. I realize theory and practice are often different from each other.
Perhaps I'm starting off over my head, or maybe I need to realize this is
all pretty low-level stuff and just get used to it being so cryptic.
Any help or pointers would be appreciated.