On Fri, Jun 18, 2010 at 2:26 PM, Justin Park <h...@rice.edu> wrote:
> But when I change the file access mode into "a",
> it returns an error message of "IOError: [Errno 9] Bad file descriptor. "
>
> What have I done wrong?

"a" is for appending only.  You can't read from a file opened in that
mode.  If you want to both read and append, you should use mode 'r+'
or 'a+', depending on whether you want the stream initially positioned
at the beginning or end of the file.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to