From: Terry Reedy on
On 6/18/2010 4:26 PM, Justin Park wrote:
> The problem is simple.
> I have 50taxa2HGT_1.txt in the current directory,
> and I can open it using any text editor (which indicates there actually
> is.)
> And I can read it in Python using
>>>> fd=open("./50taxa2HGT_1.txt", "r")
> , and it actually got opened, because I can do
>>>> for line in fd:
> ... print line
> 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?

You did not copy and paste the *complete* error message, which would say
whether the error occurred when opening or reading the file.