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?
Thanks in advance,
Mode "a" opens the file for appending, which means that you can't read
from it, only write to it.
For Python 2.6.5 on Windows XP Pro I get:
IOError: File not open for reading
which is more helpful.
--
http://mail.python.org/mailman/listinfo/python-list