Re: [Tutor] Check for file in different dirs

2008-07-25 Thread Monika Jisswel
> > 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

Re: [Tutor] Check for file in different dirs

2008-07-24 Thread Alan Gauld
"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

Re: [Tutor] Check for file in different dirs

2008-07-24 Thread bob gailer
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

[Tutor] Check for file in different dirs

2008-07-24 Thread Timo
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