Sorta noob question - file vs. open?

Scott David Daniels Scott.Daniels at Acm.Org
Wed Aug 24 17:07:45 EDT 2005


Peter A. Schott wrote:
> I'll have to try this again.  I obviously did something wrong in my code.  I was
> getting errors about not being able to write a string because it wasn't
> supported.  It was driving me nuts for a while until I just gave up and went
> back to open().

I expect somewhere previously in the same frame (perhaps the
interpreter top level) you had done either "file = open(...)"
or "file = file(...)" which would prevent you from getting to the
file in __builtins__.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list