[Tutor] Open file error

andy senoaji andy.senoaji at gmail.com
Thu Jan 19 06:49:34 CET 2006


Thanks Danny & Alan,

your print repr(os.listdir("C:/")) has embarrased myself :(. I found out the
file name is Test.txt.txt in my c: drive. I guess I learn something here.

Again Thanks

Andy

On 1/17/06, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
>
>
>
> 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:
>
> [cut]
>
> 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!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060118/500f0ce1/attachment.htm 


More information about the Tutor mailing list