I have to check whether a file is present a particular path in Mac OS X.

There is a file called foo.F90 inside the directory.

But when I do if(os.path.exists(PATH_TO_foo.f90)), it returns true and does not notice that f90 is lower case and the file which exists is upper case F90.

I tried open(PATH_TO_foo.f90, "r"), even this does not work

How do I get around this?

Edit
Report