[Tutor] File IO

Amadeo Bellotti amadeo.bellotti at gmail.com
Wed Aug 30 00:06:16 CEST 2006


well i made a typo and puzzleanswers was empty i fixed it and it works fine
thank you guys so much

On 8/29/06, Bob Gailer <bgailer at alum.rpi.edu> wrote:
>
> Amadeo Bellotti wrote:
> > Ok im trying to create a file that the user chooses the name of and
> > print a varible that is a string to the text file. but for some reason
> > whne i do this code:
> >
> > FILE = open(filename, "w")
> > FILE.write(puzzleanswers)
> > FILE.close()
> >
> > it doesnt write anything
> That could mean you get an empty file or you don't see the file. Which
> is it?
> If the file is empty that means puzzleanswers is  empty.
> If you don't see the file that means it is being written someplace other
> than where you are looking.
>
> --
> Bob Gailer
> 510-978-4454
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060829/35abe572/attachment.html 


More information about the Tutor mailing list