>
> for f in file1 file2 file3 file4 file5:
> a = os.path.exists('/home/dir1/file.txt')
> b = os.path.exists('/home/dir2/file.txt')
> c = os.path.exists('/home/dir3/file.txt')
> if a and b and c:
> do ...
> elif a and b :
> do ...
> elif a :
> do
"Timo" <[EMAIL PROTECTED]> wrote
I want to check for a file in 3 directories. If the file is found in
1 of the dirs then do something, if the file was found in 2 or 3
dirs, then do something else. I know the paths and filename. How can
this be done?
Lots of ways but one is to write a predica
Timo wrote:
I want to check for a file in 3 directories. If the file is found in 1
of the dirs then do something, if the file was found in 2 or 3 dirs,
then do something else. I know the paths and filename. How can this be
done?
We like to give a hand and prefer not to write programs.
So I s
I want to check for a file in 3 directories. If the file is found in 1
of the dirs then do something, if the file was found in 2 or 3 dirs,
then do something else. I know the paths and filename. How can this be done?
___
Tutor maillist - Tutor@python