[Tutor] Open file error

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Jan 18 08:05:57 CET 2006

On Tue, 17 Jan 2006, andy senoaji wrote:

> I'm back to my home machine, and ran again the open method, just to test
> my sanity Here are the results:


Hi Andy,

Unfortunately, there are a few things that might be happening here.  You
mentioned earlier that:

> I know for sure that the file is there, I even put copies of the files
> here and there, just to guess how python does the file search, but it

Do you mind trying the following?  I want to double check that the
filename doesn't have anything silly in it like spaces.

import os
print repr(os.listdir("C:/"))

Can you copy-and-paste what you see from this?  This will show us the
names of things in the toplevel directory, and should help to reveal why
we're having so much trouble opening up that darn file.  *grin*

Good luck to you!

More information about the Tutor mailing list